Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@stephenyeargin

Description

@stephenyeargin

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):

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions