From: Joel VanderWerf Date: 2009-08-27T03:13:29+09:00 Subject: Re: ||= with 1.8 and 1.9 ? Brian Candler wrote: > I always thought that a ||= b was just a shortcut for a = a || b, but it > looks like that's not necessarily true in 1.9. It's never been exactly the same in 1.8, either. 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} http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/47f273f6ab57303e/291babfc79b4b822 -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407