From: "Pieter V." Date: 2009-06-05T04:23:16+09:00 Subject: Re: and in ternary operator On Thu, Jun 4, 2009 at 12:13 PM, 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 If the goal is to always run the truthy condition and optionally some extra code for the falsey one, this will work as well: do_a ; do_b if ifTrue > > Thank you. > -- > Posted via http://www.ruby-forum.com/. > >