-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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/MultipleComparison generates invalid code #9520
Labels
Comments
8 tasks
koic
added a commit
to koic/rubocop
that referenced
this issue
Feb 16, 2021
…omparison` Fixes rubocop#9520. This PR fixes an incorrect auto-correct for `Style/MultipleComparison` when comparing a variable with multiple items in `if` and `elsif` conditions.
bbatsov
pushed a commit
that referenced
this issue
Feb 19, 2021
Fixes #9520. This PR fixes an incorrect auto-correct for `Style/MultipleComparison` when comparing a variable with multiple items in `if` and `elsif` conditions.
This was referenced Mar 6, 2021
Closed
This was referenced Mar 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Input
When running this file in its entirety, the following code in particular breaks:
Output
The output is completely different:
Steps to reproduce the problem
Run
Style/MultipleComparison
on this file:RuboCop version
Include the output of
rubocop -V
orbundle exec rubocop -V
if using Bundler.If you see extension cop versions (e.g.
rubocop-performance
,rubocop-rspec
, and others)output by
rubocop -V
, include them as well. Here's an example:The text was updated successfully, but these errors were encountered: