summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJake Faris <jake.faris@alphasights.com>2015-10-30 10:22:23 -0400
committerJake Faris <jake.faris@alphasights.com>2015-10-30 10:22:23 -0400
commit33337d045d5af8155e9ef3418f6f766298977a15 (patch)
tree78f9b1c10a36c02b97f1b5de24366328a7c1a42e
parentf0a4c88acfac9514aca6dd33e2d3f8c4d5e815dc (diff)
Adds bitwise operators (AND, OR, XOR)
-rw-r--r--ruby.html.markdown6
1 files changed, 5 insertions, 1 deletions
diff --git a/ruby.html.markdown b/ruby.html.markdown
index 998b4bf7..f13b77ac 100644
--- a/ruby.html.markdown
+++ b/ruby.html.markdown
@@ -41,7 +41,11 @@ You shouldn't either
35 / 5 #=> 7
2**5 #=> 32
5 % 3 #=> 2
-5 ^ 6 #=> 3
+
+# Bitwise operators
+3 & 5 #=> 1
+3 | 5 #=> 7
+3 ^ 5 #=> 6
# Arithmetic is just syntactic sugar
# for calling a method on an object