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
When a class or module uses if to conditionally define a private method, the Lint/UselessAccessModifier cop seems to thing that the private access modifier is useless.
- Add detection of conditionally defined methods,
- Add detection of dynamically defined methods,
- Ensure singleton class methods are handled correctly,
- DRY up some repetition in specs.
- Add detection of conditionally defined methods,
- Add detection of dynamically defined methods,
- Ensure singleton class methods are handled correctly,
- DRY up some repetition in specs.
When a class or module uses
if
to conditionally define a private method, theLint/UselessAccessModifier
cop seems to thing that theprivate
access modifier is useless.Expected behavior
No offenses.
Actual behavior
One offense:
Steps to reproduce the problem
Run
rubocop
on this (contrived) test.rb file:RuboCop version
The text was updated successfully, but these errors were encountered: