From: Robb Shecter Date: 2008-05-28T04:08:32+09:00 Subject: Can someone explain this syntax in new? I found this in an old post: "Here's a Hash that automatically creates new hashes for each key you try to access (specifically 1-level deep for a '2-dimensional' hash): people = Hash.new{ |me,key| me[ key ] = {} } people[ :gavin ][ :age ] = 34 people[ :gavin ][ :sex ] = :male people[ :fido ][ :species ] = :dog p people #=> {:gavin=>{:age=>34, :sex=>:male}, :fido=>{:species=>:dog}} ...but there was no further explanation. Could somebody explain the syntax in the first line? Is this overwriting new()? Thanks, Robb -- Posted via http://www.ruby-forum.com/.