= private = protected
&(enum)
Returns a new set containing elements common to the set and the given enumerable object.
# File lib/set.rb, line 297 def &(enum) enum.is_a?(Enumerable) or raise ArgumentError, "value must be enumerable" n = self.class.new enum.each { |o| n.add(o) if include?(o) } n end