From: Robert Klemme Date: 2008-02-09T20:09:56+09:00 Subject: Re: If || statements On 09.02.2008 01:36, Tim Hunter wrote: > 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) >> >> >> > > You don't have to ask. Try it yourself. Start up irb and enter a statement: > > $ irb > irb(main):001:0> x = 2 > => 2 > irb(main):002:0> y = 3 > => 3 > irb(main):003:0> z = "a" > => "a" > irb(main):004:0> p "some string" if (x || y || z) > "some string" > => nil > irb(main):005:0> And you can spare the brackets irb(main):001:0> "yes" if false || false || true => "yes" Cheers robert