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
# frozen_string_literal: true FOO = %w(one two three).freeze
# frozen_string_literal: true FOO = [%w(one two three)].freeze
Note the extra array.
Save this as foo.rb:
foo.rb
# frozen_string_literal: true FOO = %w(one two three)
rubocop -c /dev/null -a foo.rb
$ rubocop -V 0.47.1 (using Parser 2.3.3.1, running on ruby 2.3.3 x86_64-darwin16)
The text was updated successfully, but these errors were encountered:
I confirmed this and I'm looking into it.
Sorry, something went wrong.
[Fix rubocop#3959] Fix MutableConstant for percent arrays
95526a2
`Style/MutableConstant` shouldn't wrap "percent arrays" (`%w`, `%W`, `%i`, etc.) with extra brackets when autocorrecting
[Fix #3959] Fix MutableConstant for percent arrays
5d0251b
Thank you @mikegee !
%w
%i
Successfully merging a pull request may close this issue.
Expected behavior
Actual behavior
Note the extra array.
Steps to reproduce the problem
Save this as
foo.rb
:RuboCop version
The text was updated successfully, but these errors were encountered: