From: Jesse Breuer Date: 2011-07-23T08:18:16+09:00 Subject: using "puts" in ternary operator I find that I get errors if I use "puts" in it's standard form in a ternary operator x == 2 ? puts "two" : puts "one" error is: SyntaxError: (irb):3: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' x == 2 ? puts "two" : puts "one" ^ (irb):3: syntax error, unexpected ':', expecting $end x == 2 ? puts "two" : puts "one" ^ It works however if I use this form: x == 2 ? puts("two") : puts("one") Could someone help me figure out why? Is there documentation somewhere on this? thanks -- Posted via http://www.ruby-forum.com/.