-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
Description
I have this code:
def render(component, *, **, &)
if component.is_a?(Middleman::ViewComponents::Components::Base)
component.render_in(self, *, **, &)
else
super
end
end
I let rubocop auto-correct it.
Expected behavior
It should be auto-corrected to:
def render(component, ...)
if component.is_a?(Middleman::ViewComponents::Components::Base)
component.render_in(self, ...)
else
super
end
end
Actual behavior
Instead, the additional parameter self
is removed. (component
is kept)
def render(component, ...)
if component.is_a?(Middleman::ViewComponents::Components::Base)
component.render_in(...) # <== self is gone
else
super
end
end
RuboCop version
1.79.0 (using Parser 3.3.9.0, Prism 1.4.0, rubocop-ast 1.46.0, analyzing as Ruby 3.4, running on ruby 3.4.5) [x64-mingw-ucrt]
- rubocop-performance 1.25.0
- rubocop-rake 0.7.1