From: "Hal E. Fulton" Date: 2001-12-24T03:35:52+09:00 Subject: [ruby-talk:29372] Re: a better way? ----- Original Message ----- From: Mathieu Bouchard To: ruby-talk ML ; Cc: ruby-talk ML Sent: Sunday, December 23, 2001 12:07 PM Subject: [ruby-talk:29371] Re: a better way? > fahrenheit = Hash.new do |h, c| h[c] = c * 9 / 5 + 32 end > p fahrenheit[100] # => 212 > p fahrenheit[200] # => 392 > > why module Temp (or class Temp) is there at all is beyond me. I guess you are correct. I did not notice that these were unnecessary. Thanks also for fixing the spelling of Fahrenheit... it is misspelled as often as Gandhi. ;) The block semantics for Hash -- when was this introduced? I recall it was discussed long before it was implemented. I commonly use 1.6.5, and it is not there. Is it in any 1.6.x, or is it a 1.7ism? Hal