You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
patrick@znovu ~/P/I/P/app (dependabot-bundler-ruboc…*) $ bin/rubocop foo.rb
Inspecting 1 file
W
Offenses:
foo.rb:4:11: W: [Correctable] Lint/UnusedMethodArgument: Unused method argument - name. If it's necessary, use _ or _name as an argument name to indicate that it won't be used. If it's unnecessary, remove it. You can also write as bar(*) if you want the method to accept any arguments but don't care about them.
def bar(name)
^^^^
1 file inspected, 1 offense detected, 1 offense autocorrectable
while in 1.43 the code was accepted as valid (which it is)
The code is perfectly valid, and the suggested correction is dangerous and will render it non-functioning. I expect no error to be given. The behavior is related to numbered parameters, if the numbered parameter is removed, it works as expected.
Given a code such as:
In 1.44 I am seeing an error:
while in 1.43 the code was accepted as valid (which it is)
Expected behavior
The code is perfectly valid, and the suggested correction is dangerous and will render it non-functioning. I expect no error to be given. The behavior is related to numbered parameters, if the numbered parameter is removed, it works as expected.
Actual behavior
See above.
RuboCop version
The text was updated successfully, but these errors were encountered: