summaryrefslogtreecommitdiffhomepage
path: root/ruby.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.html.markdown')
-rw-r--r--ruby.html.markdown5
1 files changed, 5 insertions, 0 deletions
diff --git a/ruby.html.markdown b/ruby.html.markdown
index 998b4bf7..6114c14e 100644
--- a/ruby.html.markdown
+++ b/ruby.html.markdown
@@ -77,6 +77,11 @@ false.class #=> FalseClass
2 <= 2 #=> true
2 >= 2 #=> true
+# Combined comparison operator
+1 <=> 10 #=> -1
+10 <=> 1 #=> 1
+1 <=> 1 #=> 0
+
# Logical operators
true && false #=> false
true || false #=> true