From: Phrogz Date: 2007-06-13T00:55:07+09:00 Subject: Re: how to make a[2][2][3]=4 work? On Jun 12, 6:21 am, Daniel Martin wrote: > In addition to what's already been posted, there's this, which doesn't > require any extra variables or methods: > > a = Hash.new{|h,k| h[k]=Hash.new &h.default_proc} Thanks for this - I didn't know about the default_proc method. Quite elegant in this case.