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
Consider:
class C def self.foo(&block) block.call end def bar(&block) block.call end end
Rubocop flags bar as a RedundantBlockCall offense, but not foo.
bar
RedundantBlockCall
foo
Both foo and bar should be flagged as RedundantBlockCall
1.22.1 (using Parser 3.0.2.0, rubocop-ast 1.12.0, running on ruby 2.6.6 x86_64-darwin20) - rubocop-performance 1.11.5
The text was updated successfully, but these errors were encountered:
[Fix rubocop#261] Fix a false negative for `Performance/RedundantBloc…
d85f59c
…kCall` Fixes rubocop#261. This PR fixes a false negative for `Performance/RedundantBlockCall` when using `block.call` in a class method'.
Performance/RedundantBlockCall
Merge pull request #266 from koic/false_negative_for_performance_redu…
9feae4b
…ndant_block_call [Fix #261] Fix a false negative for `Performance/RedundantBlockCall`
Successfully merging a pull request may close this issue.
Consider:
Rubocop flags
bar
as aRedundantBlockCall
offense, but notfoo
.Expected behavior
Both
foo
andbar
should be flagged asRedundantBlockCall
RuboCop version
The text was updated successfully, but these errors were encountered: