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

Style/AndOr autocorrect failing for assignment operation #3445

Closed
NobodysNightmare opened this issue Aug 26, 2016 · 0 comments
Closed

Style/AndOr autocorrect failing for assignment operation #3445

NobodysNightmare opened this issue Aug 26, 2016 · 0 comments
Labels

Comments

@NobodysNightmare
Copy link
Contributor

Steps to reproduce the problem

Given a file rubocop.rb:

foo.bar = 'baz' and bang

Run:

rubocop -a rubocop.rb

Expected behavior

Autocorrection for Style/AndOr does not break syntax of assignment operations, e.g.:

(foo.bar = 'baz') && bang

Actual behavior

Autocorrection for Style/AndOr does break syntax of assignment operations:

foo.bar(= 'baz') && bang

RuboCop version

$ rubocop -V
0.42.0 (using Parser 2.3.1.2, running on ruby 2.3.0 x86_64-linux)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants