>>>>> "n" == nord ehacedod <nordehacedod / yahoo.com> 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