Skip to content

Wrapping results in Hashie::Mash 3.5.1 causes logs to be flooded with warnings #666

@lparry

Description

@lparry

Originally opened on the wrong repo: elastic/elasticsearch-ruby#398

I updated our bundle today which included hashie@3.5.1, and found our logs are now completely overwhelmed with warnings:

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

I believe this is being caused by the "sort" key that comes back in the response body. eg: "sort":[1.121931762,1477653971450]. If I remove any use of sort from the query the warnings go away.

we're doing our searching via elasticsearch/persistence/repository if that has any bearing on things

I suspect it's related to this PR: hashie/hashie#381. I don't have a good suggestion how it might be fixed other than to stop using Hashie, but that seems like a pretty large change.


Moved from elastic/elasticsearch-ruby#398

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions