From c0a6610d65083ad0939110850c7b36495e73b208 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Mon, 4 Aug 2014 21:57:16 +0200 Subject: [PATCH] Use has_parent? in on_axis_following_sibling. --- lib/oga/xpath/evaluator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oga/xpath/evaluator.rb b/lib/oga/xpath/evaluator.rb index ba79ae6..3079104 100644 --- a/lib/oga/xpath/evaluator.rb +++ b/lib/oga/xpath/evaluator.rb @@ -282,7 +282,7 @@ module Oga context.each do |context_node| check = false - parent = context_node.respond_to?(:parent) ? context_node.parent : nil + parent = has_parent?(context_node) ? context_node.parent : nil @document.each_node do |doc_node| # Skip child nodes of the current context node, compare all