untappd icon indicating copy to clipboard operation
untappd copied to clipboard

Error logs filled with "You are setting a key that conflicts with a built-in method Hashie::Mash#count ..."

Open stephenyeargin opened this issue 7 years ago • 0 comments

It looks like at some point the Hashie library started wanting to use the .count attribute that the API also returns. This ends up flooding the logs with the message below as things get loaded in:

You are setting a key that conflicts with a built-in method Hashie::Mash#count defined in Enumerable. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
You are setting a key that conflicts with a built-in method Hashie::Mash#count defined in Enumerable. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
You are setting a key that conflicts with a built-in method Hashie::Mash#count defined in Enumerable. This can cause unexpected behavior when accessing the key as a property. You can still access the key via the #[] method.
[repeats 185 more times]

A cursory look around the internet turned up this issue in a few other repositories (including the Hashie library itself):

  • https://github.com/elastic/elasticsearch-ruby/issues/398
  • https://github.com/intridea/hashie/issues/423
  • https://github.com/goshippo/shippo-ruby-client/issues/49

The path forward appears to be either to disable the warning, or wrapping the result sets in a subclass instead.

stephenyeargin avatar Jul 05 '18 05:07 stephenyeargin