From: James Edward Gray II Date: 2005-05-12T04:46:39+09:00 Subject: Re: alternatives to ? : contruct On May 11, 2005, at 2:37 PM, John-Mason P. Shackelford wrote: > I don't believe one can use _else_ with an expression modifier. If we > try to use an if block in this case, things get ugly fast: > > a = if y == x; b; else; c; end > > Of course I may be missing something. I need to read more code than > just my own :s The if ... then ... else ... end statements people have been posting are perfectly legal Ruby. Fire up irb an give them a spin. It's basically just collapsing an if statement to one line, then capturing the proper return (since statements return things in Ruby). The "then" is just a pretty replacement for the ; here. Hope that helps. James Edward Gray II