Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure IndifferentAccess is injected after merge #436

Conversation

michaelherold
Copy link
Member

During non-destructive merges (i.e. #merge), the IndifferentAccess mixin was
failing to inject itself into the resulting Hash. This caused a NoMethodError
to be thrown when attempting to perform the action.

Now, we properly inject the mixin when necessary so the #merge method works.

Fixes #418

@dblock
Copy link
Member

dblock commented Feb 5, 2018

oh I had run into this in the past! Needs a rebase, otherwise feel free to merge, looks good.

During non-destructive merges (i.e. `#merge`), the `IndifferentAccess` mixin was
failing to inject itself into the resulting Hash. This caused a `NoMethodError`
to be thrown when attempting to perform the action.

Now, we properly inject the mixin when necessary so the `#merge` method works.
@michaelherold michaelherold force-pushed the ensure-indifferent-access-after-merge branch from 6262dac to a82c594 Compare February 5, 2018 16:58
@michaelherold
Copy link
Member Author

Rebased! Waiting on Travis now. ⌚️

@michaelherold michaelherold merged commit 3c6149c into hashie:master Feb 5, 2018
@michaelherold michaelherold deleted the ensure-indifferent-access-after-merge branch February 5, 2018 17:13
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Sep 23, 2018
## [3.6.0] - 2018-08-13

[3.6.0]: hashie/hashie@v3.5.7...v3.6.0

### Added

* [#455](hashie/hashie#455): Allow overriding methods when passing in a hash - [@lnestor](https://github.com/lnestor).

### Fixed

* [#435](hashie/hashie#435): Mash `default_proc`s are now propagated down to nested sub-Hashes - [@michaelherold](https://github.com/michaelherold).
* [#436](hashie/hashie#436): Ensure that `Hashie::Extensions::IndifferentAccess` injects itself after a non-destructive merge - [@michaelherold](https://github.com/michaelherold).
* [#437](hashie/hashie#437): Allow codependent properties to be set on Dash - [@michaelherold](https://github.com/michaelherold).
* [#438](hashie/hashie#438): Fix: `NameError (uninitialized constant Hashie::Extensions::Parsers::YamlErbParser::Pathname)` in `Hashie::Mash.load` - [@onk](https://github.com/onk).
* [#457](hashie/hashie#457): Fix `Trash` to allow it to copy properties from other properties - [@michaelherold](https://github.com/michaelherold).

### Miscellaneous

* [#433](hashie/hashie#433): Update Rubocop to the most recent version - [@michaelherold](https://github.com/michaelherold).
* [#434](hashie/hashie#434): Add documentation around Mash sub-Hashes - [@michaelherold](https://github.com/michaelherold).
* [#439](hashie/hashie#439): Add an integration spec for Elasticsearch - [@michaelherold](https://github.com/michaelherold).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants