From 33337d045d5af8155e9ef3418f6f766298977a15 Mon Sep 17 00:00:00 2001 From: Jake Faris Date: Fri, 30 Oct 2015 10:22:23 -0400 Subject: Adds bitwise operators (AND, OR, XOR) --- ruby.html.markdown | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3