# File lib/html/selector.rb, line 450
450:     def select(root)
451:       matches = []
452:       stack = [root]
453:       while node = stack.pop
454:         if node.tag? && subset = match(node, false)
455:           subset.each do |match|
456:             matches << match unless matches.any? { |item| item.equal?(match) }
457:           end
458:         elsif children = node.children
459:           stack.concat children.reverse
460:         end
461:       end
462:       matches
463:     end