flatten_merge(set, seen = Set.new) protected

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/set.rb, line 168
  def flatten_merge(set, seen = Set.new) # :nodoc:
    set.each { |e|
      if e.is_a?(Set)
        if seen.include?(e_id = e.object_id)
          raise ArgumentError, "tried to flatten recursive Set"
        end

        seen.add(e_id)
        flatten_merge(e, seen)
        seen.delete(e_id)
      else
        add(e)
      end
    }

    self
  end
Register or log in to add new notes.