Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable deprecation warnings when using -W or -w #145

Merged
merged 1 commit into from
Dec 10, 2020

Conversation

jeremyevans
Copy link
Contributor

Requested in Ruby Bug 17377

@@ -140,7 +140,7 @@ def IRB.parse_opts(argv: ::ARGV)
when "1"
$VERBOSE = false
else
$VERBOSE = true
Warning[:deprecated] = $VERBOSE = true
Copy link

@JunichiIto JunichiIto Dec 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you need to consider to switch category?

$ ruby --help
  -W[level=2|:category]
                  set warning level; 0=silence, 1=medium, 2=verbose

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think considering it is required for this commit. I'm not against it, but it's significantly more involved in terms of implementation, and I'm not attempting to replicate all aspects of the behavior of ruby -W in this commit, only trying to address what I see as the most important issue. I'll leave it up to the irb maintainers whether replicating all behaviors of ruby -w and ruby -W for irb -w and and irb -W is worth the implementation cost.

@aycabta aycabta merged commit 39daef7 into ruby:master Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants