From: Harry Kakueki Date: 2013-03-30T11:00:53+09:00 Subject: Re: Hash with default --bcaec51dd567e7737b04d91ac1d6 Content-Type: text/plain; charset=ISO-8859-1 Thanks, everybody. I like this because it does what I want and it is easy for me to read. h = Hash.new {|x,y| y}.merge!("two"=>2, "three"=>3) p h["two"] p h["three"] p h["tree"] p h Harry --bcaec51dd567e7737b04d91ac1d6 Content-Type: text/html; charset=ISO-8859-1
Thanks, everybody.

I like this because it does what I want and it is easy for me to read.

h = Hash.new {|x,y| y}.merge!("two"=>2, "three"=>3)
p h["two"]
p h["three"]
p h["tree"]
p h


Harry

--bcaec51dd567e7737b04d91ac1d6--