title: How do I create a unique array with Nokogiri?
body: <p>I have code that looks like:</p>
  
  <pre><code>file = Nokogiri::XML(File.open('file.xml'))
  test = file.xpath("//title") #all &lt;title&gt; elements in xml file
  </code></pre>
  
  <p>Then when I try:</p>
  
  <pre><code>puts test.uniq
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code> undefined method `uniq' for #&lt;Nokogiri::XML::NodeSet:0x000000011b8bf8&gt; 
  </code></pre>
  
  <p>Is <code>test</code> not an array? If it's not, how do I make it one?</p>
  
  <p>Otherwise, how do I get only unique values from the <code>test</code> array?</p>