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 behaviorIt should be auto-corrected to:
def render(component, ...) if component.is_a?(Middleman::ViewComponents::Components::Base) component.render_in(self, ...) else super end endActual 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 endRuboCop 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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4