From: Robert Klemme Date: 2011-11-12T08:20:56+09:00 Subject: Re: The fastest way to read files On Fri, Nov 11, 2011 at 10:07 PM, Ryan Davis wrote: > > On Nov 11, 2011, at 04:50 , Robert Klemme wrote: > >> # ensure every word is only once in memory >> words = Hash.new {|h,k| k.freeze; h[k] = k} > > AFAIK, Ruby hashes have (almost) always frozen their keys. I know. That's the reason why I do the freeze in the block. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/