From: w_a_x_man Date: 2010-10-21T02:40:12+09:00 Subject: Re: Long conditional statements On Oct 20, 9:26 am, Courtland Allen wrote: > [Note:  parts of this message were removed to make it a legal post.] > > Some parts of my code call for really long conditional statements of the > form: > > if a or b or c or d or e or f > >   doSomething() > > end > > Is there a more aesthetically-pleasing way to accomplish this? > > -- > *Courtland Allen* x = 4 ; y = 9 ; z = -2 ==>-2 def do_something puts "Something done." end ==>nil if x.odd? or y.even? or z < 0 do_something end Something done. ==>nil x.even? and y.odd? and puts "Done." Done. ==>nil