summaryrefslogtreecommitdiffhomepage
path: root/ruby.html.markdown
diff options
context:
space:
mode:
authorJonathan Scott Duff <duff@pobox.com>2015-06-25 22:58:56 -0500
committerJonathan Scott Duff <duff@pobox.com>2015-06-25 22:58:56 -0500
commit2162639cd901a81a24eb4a566ba5108da87634cf (patch)
tree3bef6c762bcc04609e0a6cb219c3c169e5aa5748 /ruby.html.markdown
parent041064416115985ef336babe6ef7dbac726327fa (diff)
parentef771384ae672e341ec309cf71cf372143607892 (diff)
Merge remote-tracking branch 'upstream/master'
Conflicts: perl6.html.markdown
Diffstat (limited to 'ruby.html.markdown')
-rw-r--r--ruby.html.markdown12
1 files changed, 8 insertions, 4 deletions
diff --git a/ruby.html.markdown b/ruby.html.markdown
index 792c9c95..66a0774d 100644
--- a/ruby.html.markdown
+++ b/ruby.html.markdown
@@ -79,10 +79,14 @@ true && false #=> false
true || false #=> true
!true #=> false
-# Alternate spellings of logical operators
-true and false #=> false
-true or false #=> true
-not true #=> false
+# There are alternate versions of the logical operators with much lower
+# precedence. These are meant to be used as flow-control constructs to chain
+# statements together until one of them returns true or false.
+
+# `do_something_else` only called if `do_something` succeeds.
+do_something() and do_something_else()
+# `log_error` only called if `do_something` fails.
+do_something() or log_error()
# Strings are objects