^(enum)
public
Returns a new set containing elements
exclusive between the set and the given enumerable object. (set ^ enum) is
equivalent to ((set | enum) - (set & enum)).
Set[1, 2] ^ Set[2, 3]
Set[1, 'b', 'c'] ^ ['b', 'd']
Show source
def ^(enum)
n = Set.new(enum)
each { |o| n.add(o) unless n.delete?(o) }
n
end