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.
Expected behavior
Both foo and bar should be flagged as RedundantBlockCall
RuboCop version
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