From: Dominik Honnef Date: 2008-02-13T22:35:55+09:00 Subject: Re: If || statements On [Sat, 09.02.2008 09:39], fw wrote: > On Sat, 2008-02-09 at 09:28 +0900, John Maclean wrote: > > Hey chaps, > > > > Is is at all possible to have a statement such as > > > > p "some string " if ( stuff || more_stuff || other_stuff) > > > > > > > > I'm not sure what I'm missing here: > > $ irb > irb(main):001:0> p "hello" if (false || false || true) > "hello" > => nil > irb(main):002:0> p "hello" if (false || false) > => nil > > > HTH, > > Felix Uhm, it's working just the way everybody would expect it to work? false or false or true evaluates to true (if i have the choice i of course take the best one) false or false is just false, as there's no way to pick true. -- Dominik Honnef