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
Style/RedundantCondition making invalid corrections #10605
Labels
Comments
tomhughes
added a commit
to tomhughes/openstreetmap-website
that referenced
this issue
May 7, 2022
nobuyo
added a commit
to nobuyo/rubocop
that referenced
this issue
May 7, 2022
… argment for method in else branch is hash without braces
8 tasks
nobuyo
added a commit
to nobuyo/rubocop
that referenced
this issue
May 7, 2022
… argument for method in else branch is hash without braces
nobuyo
added a commit
to nobuyo/rubocop
that referenced
this issue
May 7, 2022
… argument for method in else branch is hash without braces
nobuyo
added a commit
to nobuyo/rubocop
that referenced
this issue
May 7, 2022
… argument for method in else branch is hash without braces Update spec/rubocop/cop/style/redundant_condition_spec.rb Co-authored-by: Koichi ITO <koic.ito@gmail.com>
koic
added a commit
that referenced
this issue
May 7, 2022
…dant-condition-with-hash [Fix #10605] Fix autocorrect for `Style/RedundantCondition`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
Running
rubocop --auto-correct
should not result in broken code.Actual behavior
Running rubocop 1.29.0 triggers a correction from
Style/RedundantCondition
on this code:changing it to this:
which is incorrect and is rejected by ruby requiring it to be changed to:
in order to work.
Steps to reproduce the problem
See above.
RuboCop version
The text was updated successfully, but these errors were encountered: