We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given
def each each_row do |row, index| yield row end end
rubocop -A should at worst do nothing.
rubocop -A
def each(&block) each_row(&block) end
This now populates the 2nd argument of each, so it's not equivalent.
each
Run rubocop -A on:
def each_row 9.times.each_with_index do |row, index| yield row, index end end def each each_row do |row, index| yield row end end
$ bundle exec rubocop -V 0.89.1 (using Parser 2.7.2.0, rubocop-ast 0.3.0, running on ruby 2.7.1 x86_64-darwin19)
The text was updated successfully, but these errors were encountered:
Style/ExplicitBlockArgument
yield
[Fix rubocop#9304] Do not register an offense for `Style/ExplicitBloc…
3ef4f0f
…kArgument` when the `yield` arguments are not an exact match with the block arguments.
[Fix #9304] Do not register an offense for `Style/ExplicitBlockArgume…
dd54974
…nt` when the `yield` arguments are not an exact match with the block arguments.
Successfully merging a pull request may close this issue.
Given
Expected behaviour
rubocop -A
should at worst do nothing.Actual behavior
This now populates the 2nd argument of
each
, so it's not equivalent.Steps to reproduce the problem
Run
rubocop -A
on:RuboCop version
The text was updated successfully, but these errors were encountered: