On Chef 10, I occasionally converted an attribute to a hash using it's `.to_hash` method so that I could modify the attribute in the recipe. This is important when, for instance, I'm building a configuration file out of lots of attributes and I need to add a common additional attribute.
In Chef 11, this doesn't work because the `.to_hash` method isn't deep; the resulting object contains ImmutableMash objects which cannot be modified. The mailing list recommended using JSON.parse(attribute.to_json) but this fails on Chef 10, where .to_json generates an unparsable string (like "\"#<Chef::Node::Attribute:0x00000001318700>\""). Another suggestion on the mailing list was .dup, but this also does a shallow has conversion.
I wish the .to_hash method really converted the attribute to a hash, with recursion. The code is trivial, and involves checking each value in an attribute to see if it responds to .to_hash and calling .to_hash on it if so.