From: Martin DeMello Date: 2008-08-21T03:32:57+09:00 Subject: Re: Iterating through a hash On Wed, Aug 20, 2008 at 11:26 AM, Robert Klemme wrote: > > Folks, thanks for leaving the #inject solution to me. :-) > > map = hash.inject({}) do |h,(k,v)| > h[k.upcase] = v > h > end without the ugly "h" at the end :) : map = hash.inject({}) {|h, (k,v)| h.update({k.upcase => v})} martin