summaryrefslogtreecommitdiffhomepage
path: root/ruby.html.markdown
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.html.markdown')
-rw-r--r--ruby.html.markdown12
1 files changed, 7 insertions, 5 deletions
diff --git a/ruby.html.markdown b/ruby.html.markdown
index 560c1750..6e618861 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
@@ -194,6 +195,7 @@ end
counter = 1
while counter <= 5 do
puts "iteration #{counter}"
+ counter += 1
end
#=> iteration 1
#=> iteration 2