From: "Darryl L. Pierce" Date: 2011-09-29T05:33:49+09:00 Subject: Re: Ruby Syntax @keywords ||= [ ] On Thu, Sep 29, 2011 at 02:07:35AM +0900, Bhavesh Sharma wrote: > Sorry if this comes across as a dumb question, but what does the > following syntax mean in ruby. > > @keywords ||= [] > > I understand that its setting the instance variable as an array but what > is the logical operator '||' doing in there. If @keywords is null then the above would assign the empty array to it. -- Darryl L. Pierce http://mcpierce.multiply.com/ "What do you care what people think, Mr. Feynman?"