Skip to content
New issue

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

Lint/SymbolConversion autocorrect broken for method arguments #10462

Closed
vlad-pisanov opened this issue Mar 21, 2022 · 0 comments · Fixed by #10463
Closed

Lint/SymbolConversion autocorrect broken for method arguments #10462

vlad-pisanov opened this issue Mar 21, 2022 · 0 comments · Fixed by #10463
Labels

Comments

@vlad-pisanov
Copy link

vlad-pisanov commented Mar 21, 2022

Consider

f(:'foo' => 'bar')

Lint/SymbolConversion incorrectly autocorrects this to:

f(foo => 'bar')

Expected behavior

Should be autocorrected to

f(:foo => 'bar')

Steps to reproduce the problem

rubocop --only Lint/SymbolConversion -a example.rb

RuboCop version

$ [bundle exec] rubocop -V
1.26.0 (using Parser 3.1.1.0, rubocop-ast 1.16.0, running on ruby 2.6.6 x86_64-darwin20)
  - rubocop-performance 1.11.5
koic added a commit to koic/rubocop that referenced this issue Mar 21, 2022
…ersion`

Fixes rubocop#10462.

This PR fixes an incorrect autocorrect for `Lint/SymbolConversion`
when using a quoted symbol key with hash rocket.
koic added a commit to koic/rubocop that referenced this issue Mar 21, 2022
…ersion`

Fixes rubocop#10462.

This PR fixes an incorrect autocorrect for `Lint/SymbolConversion`
when using a quoted symbol key with hash rocket.
@koic koic added the bug label Mar 21, 2022
bbatsov pushed a commit that referenced this issue Mar 22, 2022
Fixes #10462.

This PR fixes an incorrect autocorrect for `Lint/SymbolConversion`
when using a quoted symbol key with hash rocket.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants