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