可以在 if-else 結構中使用值的真實性

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

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

上面的程式碼列印’嘿!’ 螢幕上。