From: Bertram Scharpf Date: 2007-01-13T13:37:49+09:00 Subject: Re: What does this mean? ||= Hi Justin, Am Samstag, 13. Jan 2007, 04:52:29 +0900 schrieb Justin Ko: > I'm looking at this method and don't understand what ||= means: > > def current_account > @account ||= Account.find(session[:account_id]) > end A scheme I practice a lot: def meth parm = nil parm ||= "default" ... end ... a = some_calculation obj.meth a # a may be nil and still hits the default value Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de