We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Style/GlobalStdStream
because $stdout and STDOUT may point different object.
$stdout
STDOUT
$stdout = STDERR STDOUT.puts($stdout == STDOUT) # false
Auto-corrects with --auto-correct-all, but not --auto-correct.
--auto-correct-all
--auto-correct
Auto-corrects with --auto-correct.
Example source code now prints true instead of false.
true
false
rubocop --auto-correct --only Style/GlobalStdStream
$ bundle exec rubocop -V 0.90.0 (using Parser 2.7.1.4, rubocop-ast 0.3.0, running on ruby 2.6.3 x86_64-darwin18)
The text was updated successfully, but these errors were encountered:
Absolutely! Thanks :-) Fixed in #8691.
Sorry, something went wrong.
[Fixes rubocop#8688] Mark Style/GlobalStdStream as unsafe autocorre…
636671d
…ction.
a60c3d2
No branches or pull requests
because
$stdout
andSTDOUT
may point different object.Expected behavior
Auto-corrects with
--auto-correct-all
, but not--auto-correct
.Actual behavior
Auto-corrects with
--auto-correct
.Example source code now prints
true
instead offalse
.Steps to reproduce the problem
rubocop --auto-correct --only Style/GlobalStdStream
RuboCop version
The text was updated successfully, but these errors were encountered: