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

Trash warning when translating string to symbol #573

Open
jonjonw opened this issue Apr 16, 2023 · 0 comments
Open

Trash warning when translating string to symbol #573

jonjonw opened this issue Apr 16, 2023 · 0 comments
Labels

Comments

@jonjonw
Copy link

jonjonw commented Apr 16, 2023

I get a warning when a property gets translated from a symbol of the same name.

class MyTrash < Hashie::Trash
  property :a, from 'a'
end
p MyTrash.new({'a' => 'A'}

Gives the warning:

gems/hashie-5.0.0/lib/hashie/extensions/dash/property_translation.rb:132: warning: method redefined; discarding old a=

but works otherwise.

@dblock dblock added the bug? label Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants