From: Devin Mullins Date: 2006-12-24T04:02:20+09:00 Subject: Re: Help with a ruby idiom dblack@wobblini.net wrote: > It is indeed functionally equivalent to those, though all of them > would blow up :-) Not all of them. a = b unless a works, for the same reason you described a = a || b working. Here, the "a =" is parsed before the "unless a" is evaluated. But yes, a ||= b maps more closely to a = a || b, just like a += b maps to a = a + b. Devin (Though, I tend to use the ||= idiom most often with instance/class variables, who don't raise NameError like locals do.)