From: Konrad Meyer Date: 2007-09-03T05:08:11+09:00 Subject: Re: idiomatic way to assign if not nil? --nextPart1833986.QKrTjAvyWn Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 02 September 2007 09:21:25 am Erik Veenstra wrote: > I've not yet seen the right answer on the original question: > "idiomatic way to assign if not nil?". >=20 > Since false isn't nil, a||=3Db can't a correct answer, AFAIK. >=20 > _A_ good answer could be: >=20 > a=3Db if a.nil? >=20 > gegroet, > Erik V. - http://www.erikveen.dds.nl/ =46alse isn't nil, but nil is false. =2D-=20 Konrad Meyer http://konrad.sobertillnoon.com/ --nextPart1833986.QKrTjAvyWn Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBG2xgmCHB0oCiR2cwRArrgAJ93pKsvxUiVmrkls6H1ZItKBxutfACgqbZZ wfcXQvg2yAxJWrhN707GvSM= =3Ip2 -----END PGP SIGNATURE----- --nextPart1833986.QKrTjAvyWn--