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

SymbolProc might break code in conjunction with SpaceBeforeBlockBraces #1374

Closed
czenker opened this issue Oct 7, 2014 · 2 comments
Closed
Assignees

Comments

@czenker
Copy link

czenker commented Oct 7, 2014

The following line violates SymbolProc and SpaceBeforeBlockBraces:

foo.map{ |a| a.nil? }

But both autocorrections seem to interfere. The produced code is

f oo.map(&:nil?)

which is invalid Ruby code.

This happens in v0.26.1 as well as in current master (e8e1a7f)

I created a small Gist for your convenience.

Using 0.26.1 (using Parser 2.2.0.pre.5, running on ruby 1.9.3 x86_64-linux)

Let me know if more information is required.

@bbatsov
Copy link
Collaborator

bbatsov commented Oct 7, 2014

In @jonas054 we trust! :-)

@jonas054 jonas054 self-assigned this Oct 7, 2014
bbatsov added a commit that referenced this issue Oct 9, 2014
[Fix #1374] Always auto-correct one cop at a time
@czenker
Copy link
Author

czenker commented Oct 9, 2014

Thanks @jonas054 for the fast fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants