プロを目指す人のためのRuby入門
特徴が2つある。
t1 = true
f1 = false
!f1 || t1 #=> true
not f1 || t1 #=> false
t1 = true
t2 = true
f1 = false
t1 || t2 && f1 #=> true
t1 or t2 and f1 #=> false
Railsチュートリアルでの使用例
redirect_to root_url and return unless FILL_IN
def greeting(country)
country or return '入力してください'
elsifに相当するものはない。
疑問: unless文の使いどころがわからない。