From: Stefano Crocco Date: 2009-12-23T17:08:02+09:00 Subject: Re: newbie: if is not null else... On Wednesday 23 December 2009, Joshua Ballanco wrote: > |> $x ||= '-' > |> > |> > |> > |> This is a short form for > |> > |> > |> > |> $x = $x || '-' > | > |Correction, it is short form for: > | > |$x || $x = '-' > | > |...trust me, we've been over this at least 3 times, at great length, on > |the mailing list. ;-) I may be missing something, but according to page 96 of "The Ruby Programming Language", my version seems to be the correct one. It states that: results ||= [] expands to results = results || [] Stefano