-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Cop idea: string_literal.to_sym
#9353
Comments
I think this can be suggested to the Ruby style guide :-) |
I guess this cop should also check for cases like |
@deepj Why not? keys may start with uppercase, can also be ruby keywords: h = {
ABC: 42,
class: :hello,
end: 666,
} # => no problem |
Exactly what @marcandre said. { 'UAE': 'United Arab Emirates' }
=> {:UAE=>"United Arab Emirates"} |
The cop doesn't change :'UAE' == :UAE
=> true
:'UAE' == 'UAE'
=> false |
@deepj Maybe you meant to write Let's try and keep |
I apologize, I'm just mixed up several things together. |
I was surprised to see that RuboCop doesn't pickup on this in a recent PR:
The text was updated successfully, but these errors were encountered: