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

Add support for nested arrays on ObjectifiedHash (take 2) #570

Merged
merged 5 commits into from
Jul 2, 2020

Conversation

fabio-gallonetto
Copy link
Contributor

At the moment ObjectifiedHash is missing out on hierarchies of objects where there are hashes contained within an array. Which is annoying as it happens in a lot of API calls.

This just adds an extra step to the initialiser of ObjectifiedHash so that arrays of hashes are handled properly

fabio-gallonetto and others added 3 commits June 29, 2020 11:51
At the moment ObjectifiedHash is missing out on hierarchies of objects where there are hashes contained within an array. Which is annoying as it happens in a lot of API calls.

This just adds an extra step to the initialiser of ObjectifiedHash so that arrays of hashes are handled properly
@fabio-gallonetto
Copy link
Contributor Author

I got it working now: the problem was that turning on support for hash.array[2].a broke the legacy access mode hash.array[2]['a']. So I've implemented support on the ObjectifiedHash for the subscript operator to support both the old and the new mode of accessing (to avoid a breaking change)

Co-authored-by: Nihad Abbasov <nihad@42na.in>
@NARKOZ NARKOZ merged commit 9931b61 into NARKOZ:master Jul 2, 2020
@NARKOZ
Copy link
Owner

NARKOZ commented Jul 2, 2020

Thank you!

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.

2 participants