Code Editor
Control Flow in Ruby


Ruby also has the or operator (||). Ruby's || is called an inclusive or because it evaluates to true when one or the other or both expressions are true. Check it out:

true || true # => true true || false # => true false || true # => true false || false # => false
Report a Bug
If you see a bug or any other issue with this page, please report it here.