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

wrong autocorrect #1897

Closed
badal opened this issue May 15, 2015 · 1 comment
Closed

wrong autocorrect #1897

badal opened this issue May 15, 2015 · 1 comment
Assignees
Labels

Comments

@badal
Copy link

badal commented May 15, 2015

With the following code

if condition
   do_this ; do_that
end

Rubocop-0.31 fixes it as

do_this ; do_that if condition

which is not equivalent.
Note 1 : I use the semi-colon in the following case

if error_condition
   complain("error message") ; return
end

which look really better than

if error_condition
   complain ...
   return
end

Note 2: I should use the one-liner guard with parentheses
_md

@bbatsov
Copy link
Collaborator

bbatsov commented May 15, 2015

Looks like a bug indeed.

@bbatsov bbatsov added the bug label May 15, 2015
@jonas054 jonas054 self-assigned this May 17, 2015
bbatsov added a commit that referenced this issue May 17, 2015
…olon

[Fix #1897] Don't change multiple statements into modifier if
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

3 participants