From: Martin DeMello Date: 2007-01-16T22:05:32+09:00 Subject: Re: where to find info on ||= operator ? On 1/16/07, Josselin wrote: > I am using > > http://www.ruby-doc.org/docs/ProgrammingRuby/ > > a sa reference manual, but could not find info on that operator (how > to use it..) It's syntax sugar: foo = bar expands to foo = foo bar So a ||= b expands to a = a || b, which (since || is short-circuiting) means "set a to b if a is nil (or false), otherwise leave it at its current value. martin