From: Robert Klemme Date: 2007-04-13T19:30:06+09:00 Subject: Re: Idiom wanted (now hiring!) On 13.04.2007 08:02, Jonathan wrote: > 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) Just to throw something obvious (which has not been mentioned so far) into the mix: x = func(b) a = x if x :-) robert