From: Tassilo Horn Date: 2006-10-18T05:20:18+09:00 Subject: Re: ruby way to say this? matt@tidbits.com (matt neuburg) writes: Hi Matt, > meaning, if oneThing is nonzero, return oneThing, else return > otherThing. Now, I don't want to evaluate oneThing twice, so I've > ended up with this: > > (temp = oneThing()).nonzero? ? temp : otherThing() > > I don't like it. Is that culturally correct, or is there a ruby way to > speak here, that I'm not thinking of? What about this? one_thing.nonzero? || other_thing Bye, Tassilo -- * delYsid has mortgage, opportunity and penis in his score file. thats pretty effective against spam aren't you worried about missing opportunities to mortgage your penis?