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
Rubocop version 0.37.2 converts the below (awful code)
class X def test if true unless @state == 'x' puts 'never!' end end end end
into this incorrect bit of code
class X def test puts 'never!' if true && !@state == 'x' end end
the problem is !@state == 'x' should be @state != 'x'
!@state == 'x'
@state != 'x'
The text was updated successfully, but these errors were encountered:
After working on this – I personally don't like the solution. It might be better to just not autocorrect these cases, which are hopefully very rare.
Sorry, something went wrong.
4d919eb
Merge pull request #2895 from jweir/fix/unless-with-comparison
d74e059
[Fix #2894] Auto-correct properly an unless with a comparison operator
No branches or pull requests
Rubocop version 0.37.2 converts the below (awful code)
into this incorrect bit of code
the problem is
!@state == 'x'
should be@state != 'x'
The text was updated successfully, but these errors were encountered: