From: Ryan Davis Date: 2011-11-12T09:02:57+09:00 Subject: Re: The fastest way to read files On Nov 11, 2011, at 15:20 , Robert Klemme wrote: > 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. I'm confused. If you know that the key is going to be frozen anyways, why freeze it?