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

Make DeepLocate indifference-aware by default #319

Merged
merged 1 commit into from Oct 26, 2015
Merged

Conversation

michaelherold
Copy link
Member

Hashie::Extensions::DeepLocate.deep_locate, when passed a key, did not
take into account indifferent access. This lead to a regression in
v3.4.1 when Hashie::Extensions::DeepFind was modified to be backed by
DeepLocate.

This change makes the default comparator aware of indifferent access by
inspecting the object that it is called on. It works with both
ActiveSupport::HashWithIndifferentAccess and
Hashie::Extensions::IndifferentAccess.

Fixes #309

@dblock
Copy link
Member

dblock commented Oct 25, 2015

@michaelherold You should work on a fork even though you have committer access.

@dblock
Copy link
Member

dblock commented Oct 25, 2015

Looks good. CHANGELOG please. And rebase.

`Hashie::Extensions::DeepLocate.deep_locate`, when passed a key, did not
take into account indifferent access. This lead to a regression in
v3.4.1 when `Hashie::Extensions::DeepFind` was modified to be backed by
`DeepLocate`.

This change makes the default comparator aware of indifferent access by
inspecting the object that it is called on. It works with both
`ActiveSupport::HashWithIndifferentAccess` and
`Hashie::Extensions::IndifferentAccess`.

Fixes #309
@michaelherold
Copy link
Member Author

@dblock Will do - I wasn't paying attention that origin wasn't set to my fork. I'll leave this one on here for cleanliness, but make sure any others are on my fork.

@dblock
Copy link
Member

dblock commented Oct 26, 2015

Merging, thanks.

dblock added a commit that referenced this pull request Oct 26, 2015
Make DeepLocate indifference-aware by default
@dblock dblock merged commit b65b849 into master Oct 26, 2015
jsonn pushed a commit to jsonn/pkgsrc that referenced this pull request Oct 15, 2016
[3.4.6]: hashie/hashie@v3.4.5...v3.4.6

### Fixed

* [#368](hashie/hashie#368): Since `hashie/mash` can be required alone, require its dependencies - [@jrafanie](https://github.com/jrafanie).

## [3.4.5] - 2016-09-16

[3.4.5]: hashie/hashie@v3.4.4...v3.4.5

### Added

* [#337](hashie/hashie#337), [#331](hashie/hashie#331): `Hashie::Mash#load` accepts a `Pathname` object - [@gipcompany](https://github.com/gipcompany).

### Deprecated

* [#366](hashie/hashie#366): Hashie is no longer tested on Ruby < 2 - [@dblock](https://github.com/dblock).

### Fixed

* [#358](hashie/hashie#358): Fixed support for Array#dig - [@modosc](https://github.com/modosc).
* [#365](hashie/hashie#365): Ensured ActiveSupport::HashWithIndifferentAccess is defined before use in #deep_locate  - [@mikejarema](https://github.com/mikejarema).

### Miscellanous

* [#366](hashie/hashie#366): Added Danger, PR linter - [@dblock](https://github.com/dblock).

## [3.4.4] - 2016-04-29

[3.4.4]: hashie/hashie@v3.4.3...v3.4.4

### Added

* [#349](hashie/hashie#349): Convert `Hashie::Mash#dig` arguments for Ruby 2.3.0 - [@k0kubun](https://github.com/k0kubun).

### Fixed

* [#240](hashie/hashie#240): Fixed nesting twice with Clash keys - [@bartoszkopinski](https://github.com/bartoszkopinski).
* [#317](hashie/hashie#317): Ensure `Hashie::Extensions::MethodQuery` methods return boolean values - [@michaelherold](https://github.com/michaelherold).
* [#319](hashie/hashie#319): Fix a regression from 3.4.1 where `Hashie::Extensions::DeepFind` is no longer indifference-aware - [@michaelherold](https://github.com/michaelherold).
* [#322](hashie/hashie#322): Fixed `reverse_merge` issue with `Mash` subclasses - [@marshall-lee](https://github.com/marshall-lee).
* [#346](hashie/hashie#346): Fixed `merge` breaking indifferent access - [@docwhat](https://github.com/docwhat), [@michaelherold](https://github.com/michaelherold).
* [#350](hashie/hashie#350): Fixed from string translations used with `IgnoreUndeclared` - [@marshall-lee](https://github.com/marshall-lee).
@michaelherold michaelherold deleted the bugfix-deep-find branch November 17, 2019 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants