3 ms·You can do x = if foo then 'foo' else 'bar' end in Ruby, if you'd like.by steveklabnik 16y agoYou can do x = if foo then 'foo' else 'bar' end in Ruby, if you'd like.