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
Style/MutableConstant
As per this StackOverflow post, when running this cop on a piece of code with a splat assignment, it incorrectly reports a violation.
Example:
FOO = *(1...10)
No offenses are registered.
C: Freeze mutable objects assigned to constants. NUMS = *(1...10) ^^^^^^^^^
Run:
bundle exec rubocop --only Style/MutableConstant
on the above code.
$ rubocop -V 0.42.0 (using Parser 2.3.1.2, running on ruby 2.3.0 x86_64-darwin15)
The text was updated successfully, but these errors were encountered:
[Fix rubocop#3366] Make Style/MutableConstant cop aware of splat as…
dddbd53
…signments This cop would generate false positives on code like: ``` FOO = *(1...10) ``` and: ``` BAR = *[1...10].freeze ``` This change fixes that.
f281575
1aae481
…signments (rubocop#3367) This cop would generate false positives on code like: ``` FOO = *(1...10) ``` and: ``` BAR = *[1...10].freeze ``` This change fixes that.
No branches or pull requests
As per this StackOverflow post, when running this cop on a piece of code with a splat assignment, it incorrectly reports a violation.
Example:
Expected behavior
No offenses are registered.
Actual behavior
Steps to reproduce the problem
Run:
on the above code.
RuboCop version
The text was updated successfully, but these errors were encountered: