intridea/hashie — pull request #238 by bartoszkopinski (2014-11-27 04:56:10+00:00)
Title: non-obvious behaviour w/ Mash's []=

Hi,

It wasn't obvious to me that the Mash `[]=` operator duplicates even Mashes.
Combined with the (also non-obvious) fact that `[]=` does not return the value actually stored (but the value assigned), this resulted in a hard-to-find bug in my code. For example:

```ruby
x = Hashie::Mash.new
y = x[:k] = Hashie::Mash.new # or {}
x[:k].equals? y # false
```

I wonder whether the duplication of Mashes is necessary? And suggest that this behaviour be documented as a caveat. What do you think?

Thanks.

\- Felix