-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Description
Hi!
Expected behavior
In the following piece of code, both calls to super need not explicit arguments.
class Base
def fun(code)
use(code)
end
end
class Derived < Base
def fun(code)
super(code).foo
super(code).foo { |props| props }
end
end
Actual behavior
It complains only about the call without block.
$ bundle exec rubocop rubocop/super.rb
Inspecting 1 file
C
Offenses:
rubocop/super.rb:1:1: C: [Correctable] Style/FrozenStringLiteralComment: Missing frozen string literal comment.
class Base
^
rubocop/super.rb:9:5: C: [Correctable] Style/SuperArguments: Call super without arguments and parentheses when the signature is identical.
super(code).foo
^^^^^^^^^^^
1 file inspected, 2 offenses detected, 2 offenses autocorrectable
Steps to reproduce the problem
See above.
RuboCop version
$ bundle exec rubocop -V
1.69.2 (using Parser 3.3.6.0, rubocop-ast 1.36.2, analyzing as Ruby 3.3, running on ruby 3.3.6) [arm64-darwin23]
- rubocop-minitest 0.36.0
- rubocop-performance 1.23.0
Metadata
Metadata
Assignees
Labels
No labels