We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uses of private within a class defined using Class.new should not generate a Useless private access modifier. offense.
private
Class.new
Useless private access modifier.
A Useless private access modifier. offense is generated.
When I run v0.40.0 against the master branch of the biz gem, I get the following output:
v0.40.0
biz
Running RuboCop... Inspecting 80 files .......W........................................................................ Offenses: lib/biz/calculation/for_duration.rb:66:15: W: Useless private access modifier. private ^^^^^^^ lib/biz/calculation/for_duration.rb:95:15: W: Useless private access modifier. private ^^^^^^^
Here's the section of the code causing the erroneous offenses.
>> rubocop -V 0.40.0 (using Parser 2.3.1.0, running on ruby 2.3.0 x86_64-darwin15)
Hope that's helpful! Let me know if I can provide any other details.
The text was updated successfully, but these errors were encountered:
[Fix rubocop#3120] Fix #new visibility modifier scopes
25deeed
Blocks passed to {Class,Module,Struct}.new create a new scope, in a similar way to Klass.class_eval.
a65e56e
[Fix rubocop#3120] Fix #new visibility modifier scopes (rubocop#3126)
d47ab04
No branches or pull requests
Expected behavior
Uses of
private
within a class defined usingClass.new
should not generate aUseless private access modifier.
offense.Actual behavior
A
Useless private access modifier.
offense is generated.Steps to reproduce the problem
When I run
v0.40.0
against the master branch of thebiz
gem, I get the following output:Here's the section of the code causing the erroneous offenses.
RuboCop version
Hope that's helpful! Let me know if I can provide any other details.
The text was updated successfully, but these errors were encountered: