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
class RubocopIssue def self.around(&around_block) define_method(:around) do |&test_block| around_block.call { super(&test_block) } end end end
gets turned into
class RubocopIssue def self.around(&around_block) define_method(:around) do |&test_block| yield { super(&test_block) } end end end
which is a syntax error:
syntax error, unexpected '{' (SyntaxError) yield { super(&test_block) } ^
rubocop-performance should only produce valid code
rubocop-performance
rubocop-performance produced a syntax error
Run rubocop-performance on the example above
1.62.1 (using Parser 3.3.0.5, rubocop-ast 1.31.2, running on ruby 3.2.2) +server [x86_64-linux]
The text was updated successfully, but these errors were encountered:
Performance/RedundantBlockCall
[Fix rubocop#448] Fix a false positive for `Performance/RedundantBloc…
6cfb3fe
…kCall` Fixes rubocop#448. This PR fixes a false positive for `Performance/RedundantBlockCall` when using `block.call` with block argument.
0d98285
Merge pull request #449 from koic/fix_false_positive_for_performance_…
9d28120
…redundant_block_call [Fix #448] Fix a false positive for `Performance/RedundantBlockCall`
Successfully merging a pull request may close this issue.
gets turned into
which is a syntax error:
Expected behavior
rubocop-performance
should only produce valid codeActual behavior
rubocop-performance
produced a syntax errorSteps to reproduce the problem
Run
rubocop-performance
on the example aboveRuboCop version
1.62.1 (using Parser 3.3.0.5, rubocop-ast 1.31.2, running on ruby 3.2.2) +server [x86_64-linux]
The text was updated successfully, but these errors were encountered: