From: Josselin Date: 2007-01-17T07:25:15+09:00 Subject: Re: where to find info on ||= operator ? On 2007-01-16 14:05:49 +0100, "Farrel Lifson" said: > On 16/01/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..) >> >> tfyl >> >> joss >> >> >> > a ||= b > is equivalent to > a = a || b > If a is nil it will be set to b. If it is not nil it will remain unchanged. > > Farrel Thanks Farrel ... I'll use it now