lib/shenanigans/array/caret.rb in shenanigans-1.0.13 vs lib/shenanigans/array/caret.rb in shenanigans-1.0.14
- old
+ new
@@ -1,8 +1,9 @@
class Array
# Returns an array containing elements exclusive between two arrays.
- # [1, 2, 3] ^ [1, 2, 4]
- # #=> [3, 4]
+ #
+ # @example
+ # [1, 2, 3] ^ [1, 2, 4] #=> [3, 4]
def ^(other)
(self - other) | (other - self)
end
end