GithubHelp home page GithubHelp logo

Comments (10)

dblock avatar dblock commented on June 27, 2024

Is Mashie meant to be used only with Rails? Doesn't seem to be documented.

no, Hashie::Mash should work with whatever, not sure what's going on here, but appreciate some digging/specs/repro

from hashie.

najamelan avatar najamelan commented on June 27, 2024

no, Hashie::Mash should work with whatever, not sure what's going on here, but appreciate some digging/specs/repro

I could make a small reproducible example, but frankly, the code just calls a non-existing method. So if I can save the time... Just look at the ruby api docs: https://docs.ruby-lang.org/en/2.7.0/

from hashie.

najamelan avatar najamelan commented on June 27, 2024

I would propose you use the delete method instead.

from hashie.

dblock avatar dblock commented on June 27, 2024

This is Ruby 2.7? We haven't gotten to it. Appreciate a PR with the fix + adding 2.7 to CI.

from hashie.

najamelan avatar najamelan commented on June 27, 2024

There is no except method in earlier versions of ruby either.

from hashie.

dblock avatar dblock commented on June 27, 2024

I see us adding it in Railtie,

require 'hashie/extensions/active_support/core_ext/hash'
, which obviously only works for Rails. I am not sure what the history for this is.

Either way, if something is not working, the best way to fix it is to write a failing spec and a fix.

from hashie.

najamelan avatar najamelan commented on June 27, 2024

Just to avoid the expectations. I have a lot of chores to do on my own code, so I'm not volunteering to fix this.

What's probably happening is that either no integration tests exists for Mash::load or the integration tests turn on the monkey patching from rails for code that shouldn't depend on it.

I feel you are much better placed to look into that than I am, and it would probably cost you much less time since you are familiar with the code base already.

from hashie.

dblock avatar dblock commented on June 27, 2024

Just to avoid the expectations. I have a lot of chores to do on my own code, so I'm not volunteering to fix this.

Same.

from hashie.

BobbyMcWho avatar BobbyMcWho commented on June 27, 2024

Thanks for reporting this @najamelan, this was a bug introduced in 4.0.0 from a PR earlier in 2019, so we never caught it.

I've submitted a PR to resolve it, and will release a patch version once merged.

from hashie.

najamelan avatar najamelan commented on June 27, 2024

@BobbyMcWho Thanks for looking into it!

from hashie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.