XPath::DescendantOrSelfIterator
# File lib/xml/xpath.rb, line 2659 def each(node, visitor) while parent = (a = visitor.visit(node)).parent a.each_following_siblings { |i| super i, visitor } node = parent end end