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

named block call inside params breaks code #3266

Closed
RobertDober opened this issue Jun 30, 2016 · 1 comment
Closed

named block call inside params breaks code #3266

RobertDober opened this issue Jun 30, 2016 · 1 comment

Comments

@RobertDober
Copy link


Expected behavior

working code (actually just "yield" instead of "yield)" )

Actual behavior

This code
https://gist.github.com/anonymous/4c9e468632534f8bbfd0b30bab44fb50
is transformed into
this code
https://gist.github.com/anonymous/9bad599e05ca0264f53a89f664f19032

RuboCop version

$ rubocop -V
0.39.0 (using Parser 2.3.0.7, running on ruby 2.3.1 x86_64-linux)
@RobertDober
Copy link
Author

And with latest version too

0.41.1 (using Parser 2.3.1.2, running on ruby 2.3.1 x86_64-linux)

jonas054 added a commit to jonas054/rubocop that referenced this issue Jul 6, 2016
The autocorrect method should not assume that parentheses means
there are arguments. If the block is called with empty
parentheses, we replace it with a `yield` without parentheses.
@bbatsov bbatsov closed this as completed in acb10de Jul 6, 2016
Neodelf pushed a commit to Neodelf/rubocop that referenced this issue Oct 15, 2016
…bocop#3293)

The autocorrect method should not assume that parentheses means
there are arguments. If the block is called with empty
parentheses, we replace it with a `yield` without parentheses.
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

1 participant