From: Brian Adkins Date: 2008-04-06T00:55:07+09:00 Subject: Re: The ||= assignment operator On Apr 5, 8:40 am, "David A. Black" wrote: > Hi -- > > On Sat, 5 Apr 2008, Robert Dober wrote: > > Furthermore things are simple > > > (1) lval ||= rval is lval = lval || rval > > I think you mean: > > lval || lval = rval Huh? My understanding has always been that x ||= y is shorthand for x = x || y just as x += y is shorthand for x = x + y. That also seems to be the understanding of the "Programming Ruby" text (p. 125 of the latest). In other words, an assignment will take place even if it's superfluous.