From: Louis J Scoras Date: 2006-10-18T04:58:44+09:00 Subject: Re: ruby way to say this? On 10/17/06, James Edward Gray II wrote: > > If you change that to support a block, you can avoid evaluating > other_thing unless it's needed: > > def if_zero(exp) > exp.zero? ? yield : exp > end > > if_zero(one_thing) { other_thing } Ahh, yes. That is a nice improvement. +1 -- Lou.