/*
 * call-seq:
 *  dup
 *
 * Duplicate this node set
 */
static VALUE duplicate(VALUE self)
{
  nokogiriNodeSetTuple *tuple;
  xmlNodeSetPtr dupl;

  Data_Get_Struct(self, nokogiriNodeSetTuple, tuple);

  dupl = xmlXPathNodeSetMerge(NULL, tuple->node_set);

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