From: 7stud -- Date: 2009-09-11T09:48:21+09:00 Subject: Re: populating a hash from an array using inject Sorry, I pasted the ri output on top of the first part of my post, which said something to the effect of: > My question: why is bar empty? ...because h[non_existent_key] sends an array that is unassociated with any hash to the block. In other words, creating a hash with a default value does not cause a key/value pair to be created in the hash when a non-existent key is accessed. -- Posted via http://www.ruby-forum.com/.