From: 7stud -- Date: 2007-09-03T13:50:13+09:00 Subject: Hash.new with a block? Hi, In the code: h = Hash.new {|hash, key| hash[key] = []} what method is yielding the values hash, key to the code block? It doesn't seem like it could be new() since new() isn't called when you lookup a key in a hash. Does new() somehow associate that block with the method [] in Hash? Thanks. -- Posted via http://www.ruby-forum.com/.