Hi,

Am Freitag, 13. Apr 2007, 15:02:18 +0900 schrieb Jonathan:
> Is there a cool way to do this without calling the function twice?:
> 
> a = func(b) unless func(b).nil? (AKA)
> a = func(b) if func(b)

As far as I see only the second statement makes a difference
when the return value is `false'. So,

  a = func(b) || nil

would do!?

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de