Don't use Array#uniq in NodeSet#initialize.

Removing this makes the process of parsing larger XML documents a bit faster.
The downside is that NodeSet#initialize will no longer filter out duplicate
nodes, though this is not something Oga itself relies upon.

Methods such as NodeSet#push still do ignore elements already present.
This commit is contained in:
Yorick Peterse committed 2015-03-21 01:22:59 +01:00
1 parent c36b35ac0f
commit fdcd712ffe
2 files changed
+1 -8

No files matched your search

-7
View File
@@ -25,13 +25,6 @@ describe Oga::XML::NodeSet do
node.node_set.should == set
end
it 'only store unique nodes' do
n1 = Oga::XML::Element.new(:name => 'a')
set = described_class.new([n1, n1])
set.length.should == 1
end
end
describe '#each' do