summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2013-07-07 21:00:32 -0700
committerAdam Bard <github@adambard.com>2013-07-07 21:00:32 -0700
commit5e1d66c5b740cd718c7aacbd89b3a797af73eb0e (patch)
treeb59be409409027b8d57d189ed0ff06397c39c315
parent2fd1664c296cf45a5a5640def9c8dc927e885138 (diff)
parent9e4eb846c16300ef9d7466c7134387e0a8cff508 (diff)
Merge pull request #106 from alco/patch-1
Ruby: nil != false
-rw-r--r--ruby.html.markdown11
1 files changed, 6 insertions, 5 deletions
diff --git a/ruby.html.markdown b/ruby.html.markdown
index 2c9a4cb9..531971e9 100644
--- a/ruby.html.markdown
+++ b/ruby.html.markdown
@@ -43,17 +43,18 @@ false.class #=> FalseClass
1 == 1 #=> true
2 == 1 #=> false
-# apart from false itself, nil is the only other 'falsey' value
-
-nil == false #=> true
-0 == false #=> false
-
# Inequality
1 != 1 #=> false
2 != 1 #=> true
!true #=> false
!false #=> true
+# apart from false itself, nil is the only other 'falsey' value
+
+!nil #=> true
+!false #=> true
+!0 #=> false
+
# More comparisons
1 < 10 #=> true
1 > 10 #=> false