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
Given a method with a method parameter shadowing an instance method, RuboCop produces an incorrect “Redundant self detected” warning if (and only if) the method also contains an inner method definition:
classFooattr_reader:bardefmethod(bar)definner_method;endputsbar,self.bar# `bar` and `self.bar` are different!endend
Without the inner method definition everything works correctly (i.e. no “redundant self” warning is produced).
Expected behavior
No warning about “redundant self” because in fact it is not redundant at this place.
Given a method with a method parameter shadowing an instance method, RuboCop produces an incorrect “Redundant self detected” warning if (and only if) the method also contains an inner method definition:
Without the inner method definition everything works correctly (i.e. no “redundant self” warning is produced).
Expected behavior
No warning about “redundant self” because in fact it is not redundant at this place.
Actual behavior
Warning “Redundant self detected”.
Steps to reproduce the problem
Run RuboCop on the example program given above.
RuboCop version
The text was updated successfully, but these errors were encountered: