hashie/hashie

Trash warning when translating string to symbol

jonjonw opened this issue · 0 comments

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.