/*
 * call-seq:
 *  |(node_set)
 *
 * Returns a new set built by merging the set and the elements of the given
 * set.
 */
static VALUE set_union(VALUE self, VALUE rb_other)
{
  nokogiriNodeSetTuple *tuple, *other;
  xmlNodeSetPtr new;

  if(!rb_obj_is_kind_of(rb_other, cNokogiriXmlNodeSet))
    rb_raise(rb_eArgError, "node_set must be a Nokogiri::XML::NodeSet");

  Data_Get_Struct(self, nokogiriNodeSetTuple, tuple);
  Data_Get_Struct(rb_other, nokogiriNodeSetTuple, other);

  new = xmlXPathNodeSetMerge(NULL, tuple->node_set);
  new = xmlXPathNodeSetMerge(new, other->node_set);

  return Nokogiri_wrap_xml_node_set(new, rb_iv_get(self, "@document"));
}