可以在 if-else 结构中使用值的真实性

你不需要在 if-else 语句中使用双重否定。

if 'hello'
    puts 'hey!'
else
    puts 'bye!'
end

上面的代码打印’嘿!’ 屏幕上。