From: nobu.nokada@... Date: 2002-12-18T22:47:39+09:00 Subject: Re: Hash.new{...} bug? Hi, At Wed, 18 Dec 2002 22:20:50 +0900, Bulat Ziganshin wrote: > i think i found bug in "ruby 1.7.2 (2002-07-02) [i386-mswin32]" > > hash = Hash.new{Hash.new} > hash[0][0] = 1 > p hash[0] #=> {} > > i think it must print "{0=>1}". Hash 'default' proc never modify the hash itself automatically. Try with this. hash = Hash.new {|h,k| h[k] = Hash.new} -- Nobu Nakada