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
Mash #[]=
does not behave like Hash's
#390
Comments
#265 might be related ;) |
Could you please make a failing test and submit that as a pull request? That will help us diagnose what you're running into faster. |
Sure, glad to help. See schnittchen@4b7ed0c |
Yes, and make a PR. Maybe even with a fix? |
I'l see what I can do. This is indeed considered a bug, then? Have you exercised my test btw? |
Actually maybe not. You get a |
That's in conflict with https://github.com/intridea/hashie/blob/master/README.md#mash "while still retaining all Hash functionality" |
All Hash functionality is still there. All that means is that your injected item still responds to all of the Hash methods. We don't make any promises about subclasses of Hash that extend that capability. |
IMHO it's not even about Hash. It's a very basic container contract: I'll find what I've put in. |
To Mash's defense it's designed to chew data. Feel free to try and fix this, we can look at a PR and think about the implications. |
I understand that the idea is to have
which implies some conversion in The only alternatives are
|
This is related to #432 and #434. I don't think that this is a change that we can make because it breaks the behavior of accessing deeply-nested Mashes. I'm not sure if there's a way we could work around that. Perhaps if we reworked Mash to use |
I hope this demonstrates the problem:
In fact,
hashie
contains aHash
value instead of aH
.The text was updated successfully, but these errors were encountered: