From: Gary Wright Date: 2010-01-26T12:22:39+09:00 Subject: Re: Nested hash with arrays for default value On Jan 25, 2010, at 4:49 PM, Glen Holcomb wrote: > 2010/1/25 Jesús Gabriel y Galán >> The problem is that he wants the leaves of the hash to be arrays, and >> not hashes. >> > Exactly, infinite depth would be nice as it would make a more temporally > portable solution. The proxy looks to be working great. I am a bit > confused as to why the << method in the proxy doesn't overwrite a leaf with > a new array though. I'm not complaining as it works the way I want it to, > I'm just perplexed. Oops. Sorry for the confusion. The trick with the proxy is that the first time << is called on the proxy, it replaces itself with an empty array. Further lookups will return the array and not the original proxy. Gary Wright