Lars Christensen
7/1/2008 8:27:00 AM
On Jul 1, 6:49 am, Rob Biedenharn <R...@AgileConsultingLLC.com> wrote:
> On Jul 1, 2008, at 12:31 AM, Ratnavel P S wrote:
>
> > What does the ruby idiom a ||= b mean?
>
> It is like:
> a || a = b
In english, thats: If a is nil or false, then leave it, else assign a
= b.
Often used instead of code like this:
if a.nil? then
a = b
end