From: ts Date: 2003-09-03T00:25:55+09:00 Subject: Re: show me the ruby way >>>>> "n" == nord ehacedod writes: n> metaData = HashAutoVivify.new try this (only with ruby-1.8) metaData = Hash.new {|h, k| h[k] = Hash.new(0) } when ruby try to access a key which is not defined, it call the block with (hash, key), you store in hash[key] a new hash with `0' as default value Guy Decoux