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

Enable Style/ExplicitBlockArgument cop #43170

Merged
merged 1 commit into from Sep 5, 2021

Conversation

byroot
Copy link
Member

@byroot byroot commented Sep 5, 2021

This reduce the stack size which is beneficial for
exceptions performance.

See: https://gist.github.com/byroot/cb3bcadcc3701c2518d002fb8d3a4e7a

However the cop is unsafe because it might change the block arity,
so it can run into some false positives.

But let's see how much false positives it runs into.

This reduce the stack size which is beneficial for
exceptions performance.

See: https://gist.github.com/byroot/cb3bcadcc3701c2518d002fb8d3a4e7a

However the cop is unsafe because it might change the block arity,
so it can run into some false positives.
@byroot byroot force-pushed the rubocop-explicit-block-argument branch from d4afdc2 to c91c266 Compare September 5, 2021 15:06
@byroot
Copy link
Member Author

byroot commented Sep 5, 2021

So no false positive. The autocorrector however generated a few broken methods, but I fixed them manually no big deal.

@byroot byroot marked this pull request as ready for review September 5, 2021 15:24
@byroot
Copy link
Member Author

byroot commented Sep 5, 2021

The autocorrector however generated a few broken methods

Upstream PR: rubocop/rubocop#10064

@byroot byroot merged commit 78e4020 into rails:main Sep 5, 2021
@byroot byroot deleted the rubocop-explicit-block-argument branch September 5, 2021 16:13
koic added a commit to koic/rubocop-rails_config that referenced this pull request Sep 6, 2021
koic added a commit to koic/rubocop-rails_config that referenced this pull request Sep 6, 2021
koic added a commit to koic/rubocop-rails_config that referenced this pull request Sep 6, 2021
koic added a commit to koic/oracle-enhanced that referenced this pull request Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant