From: Robert Klemme Date: 2008-02-13T06:44:57+09:00 Subject: Re: nested hash from array of paths On 12.02.2008 15:30, Phrogz wrote: > On Feb 12, 7:12 am, Robert Klemme wrote: >> Full credits go to you for this line alone: >> >> auto_hash = Hash.new{ |h,k| h[k] = Hash.new &h.default_proc } >> >> Never occurred to me to use this nice one line approach instead of the >> usual two line version (first create block then use it). Thanks a >> lot, this is really a gem! > > I wish I could claim those credits. I had always used the two-line > version two until Jens Wille posted this gem in [ruby-talk:288946] > > http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/288946 Ok, then you get at least part of the credits for bringing it up again. ;-) Kind regards robert