From: Martin DeMello Date: 2008-06-12T06:12:06+09:00 Subject: Re: ||= On Wed, Jun 11, 2008 at 1:59 PM, Justin To wrote: > what does ||= do? a ||= b is shorthand for a = a || b || is the "or" operator - a || b evaluates to a unless a is nil or false, in which case it evaluates to b a ||= b is most commonly used to say "if a hasn't already been set (and is therefore nil), set it to b, else leave it alone" martin