From: botp Date: 2011-02-03T01:14:44+09:00 Subject: Re: Soliciting some help with inject method On Wed, Feb 2, 2011 at 11:52 PM, Edmond Kachale > But I also value you contribution, > ... are faster than the inject's way. inject is a lot faster in 1.9 its added adv is that you lessen the use of temp vars and everything is encap in the method.. eg, using jeremy bopps technique, one would do a.inject(Hash.new{|hash,key| hash[key]=[]}) do |hash,(key,value)| hash[key] << value hash end or add a touch of tap, a.inject(Hash.new{|h,k| h[k]=[]}) do |h,(k,value)| h.tap{|h| h[k] << value} end best regards -botp