From 23379d64671ad59432e169d92910ccd4628425d0 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 31 Jul 2015 00:22:29 +0200 Subject: [PATCH] Fixed node() type test for the XPath compiler This ensures the handler behaves the same as in the old XPath evaluator. --- lib/oga/xpath/compiler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oga/xpath/compiler.rb b/lib/oga/xpath/compiler.rb index ecf2501..cb56cd4 100644 --- a/lib/oga/xpath/compiler.rb +++ b/lib/oga/xpath/compiler.rb @@ -518,7 +518,7 @@ module Oga # @return [Oga::Ruby::Node] # def on_type_test_node(input) - input.is_a?(XML::Node) + input.is_a?(XML::Node).or(input.is_a?(XML::Document)) end private