title: Can I merge two Set objects in Ruby?
body: <p>I understand the <a href="http://ruby-doc.org/stdlib-2.3.0/libdoc/set/rdoc/Set.html" rel="noreferrer">Set class</a> has the merge method just as the Hash class does. However, the <a href="http://ruby-doc.org/stdlib-2.3.0/libdoc/set/rdoc/Set.html#method-i-merge" rel="noreferrer">Set#merge documentation</a> says:</p>
  
  <blockquote>
    <p>Merges the elements of the given enumerable object to the set and returns self.</p>
  </blockquote>
  
  <p>It seems that merging can only take place between a Set and another non-Set object. Is that the case, or can I merge two sets as below?</p>
  
  <pre><code>set1.merge(set2)
  </code></pre>