From: Aldric Giacomoni Date: 2009-08-27T03:21:50+09:00 Subject: Re: ||= with 1.8 and 1.9 ? Joel VanderWerf wrote: > h = Hash.new(0) > h[1] ||= 2 # this... > h[3] = h[3] || 4 # is not like this... > h[5] || h[5] = 6 # but more like this. > p h # {3=>0} > Hashes have always been a kind of special case, especially when they have a default value set up :-) We're talking about assignments on plain variables, which are (I thought) more clear-cut. -- Posted via http://www.ruby-forum.com/.