From: Brian Candler Date: 2009-06-05T05:54:48+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 'and' is very low precendence operator, and also will only do_b if the result of do_a is true. ifTrue ? do_a : (do_a, do_b) -- Posted via http://www.ruby-forum.com/.