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