From: Joel VanderWerf Date: 2009-06-05T04:20:22+09:00 Subject: Re: and in ternary operator Parv G. wrote: > hi, > > i would like to do something like the following > > if true > do_a > else > d_a > d_b > end > > Can this be done using ternary operator? > > This seem to give different result: > ifTrue ? do_a : do_a and do_b > > Thank you. result = false ? nil : (x=1; x+=10; x) p result # ==> 11 -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407