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

[FIX #4181] AmbiguousBlockAssociation gives extended advice #4235

Conversation

smakagon
Copy link
Contributor

@smakagon smakagon commented Apr 3, 2017

With this fix Lint/AmbiguousBlockAssociation gives extended advice.

For example for this code:
Foo.some_method a { |el| puts el }

It would return this message:

Parenthesize the param a { |el| puts el } to make sure that the block will be associated with the a method call.

As suggested in #4181

@smakagon smakagon force-pushed the 4181_ambiguous_block_association_gives_bad_advice branch from f6856a6 to 48aa7bd Compare April 3, 2017 00:58
@smakagon smakagon force-pushed the 4181_ambiguous_block_association_gives_bad_advice branch from 48aa7bd to ba4a312 Compare April 3, 2017 01:13
@bbatsov bbatsov merged commit 67ca736 into rubocop:master Apr 3, 2017
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

Successfully merging this pull request may close these issues.

None yet

2 participants