Subject: Re: idiomatic way to assign if not nil?
From: Erik Veenstra <erikveen gmail.com>
Date: Mon, 3 Sep 2007 01:21:25 +0900
References: 266616
In-reply-to: 266616
I've not yet seen the right answer on the original question:
"idiomatic way to assign if not nil?".
Since false isn't nil, a||=b can't a correct answer, AFAIK.
_A_ good answer could be:
a=b if a.nil?
gegroet,
Erik V. - http://www.erikveen.dds.nl/