From: "Sam T." Date: 2011-02-10T23:12:06+09:00 Subject: Ruby ternary operator If I do the following: value="off" p value == "on" ? "YES" : "NO" p value Then I get the >> "NO", "off" Does anyone know how I assign the result of the statement to a variable. e.g the result of: value="off" value == "on" ? "YES" : "NO" >> "NO" -- Posted via http://www.ruby-forum.com/.