Closed wawer77 closed 1 year ago
When checking map(&:method_x).map(&:method_y) line being a definition of another method, an error is reported:
map(&:method_x).map(&:method_y)
1 error occurred: An error occurred while Performance/MapMethodChain cop was inspecting (...)
Inform about the offence / correct the offence.
I get following message after running rubocop -d:
rubocop -d
(x) files inspected, no offenses detected 1 error occurred: An error occurred while Performance/MapMethodChain cop was inspecting (x)
Define a method with 2 map methods chained, like:
def method map(&:method_x).map(&:method_y) end
1.56.3 (using Parser 3.2.2.3, rubocop-ast 1.29.0, running on ruby 3.2.2) [arm64-darwin22] - rubocop-performance 1.19.1 - rubocop-rails 2.21.1
When checking
map(&:method_x).map(&:method_y)
line being a definition of another method, an error is reported:Expected behavior
Inform about the offence / correct the offence.
Actual behavior
I get following message after running
rubocop -d
:Steps to reproduce the problem
Define a method with 2 map methods chained, like:
RuboCop version