Merge pull request #1908 from farisj/ruby-add-bitwise-operators

Adds bitwise operators (AND, OR, XOR)
This commit is contained in:
Adam Bard 2015-10-31 19:04:51 +08:00
commit aa4631e4b8

View File

@ -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