News for hackers. Stuff that matters.
Re:Using “and” and “or” in Ruby by anthonyb on Monday August 02, 2010 @08:28PM (#1569639)
In Python, the side effects were considered so nasty that they finally added ternary operators in 2.6. The syntax goes like:

    x = 'foo' if foo else bar
which is at least more readable than the C/PHP/Ruby equivalent.
Re:Using “and” and “or” in Ruby by steveklabnik on Monday August 02, 2010 @10:42PM (#1569910)
You can do

     x = if foo then 'foo' else 'bar' end
in Ruby, if you'd like.