From d050a28f769b43e89bd0a06d36810c69de882412 Mon Sep 17 00:00:00 2001 From: kou Date: Wed, 4 Apr 2018 03:26:01 +0000 Subject: rexml: Fix a XPath bug of $variable [Bug #14600] * lib/rexml/functions.rb: Fix a bug that "$variable" returns node instead of ndoe set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rexml/xpath_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rexml') diff --git a/lib/rexml/xpath_parser.rb b/lib/rexml/xpath_parser.rb index a4f5d2508a..6a32a06440 100644 --- a/lib/rexml/xpath_parser.rb +++ b/lib/rexml/xpath_parser.rb @@ -375,7 +375,7 @@ module REXML when :variable var_name = path_stack.shift - return @variables[ var_name ] + return [@variables[var_name]] # :and, :or, :eq, :neq, :lt, :lteq, :gt, :gteq # TODO: Special case for :or and :and -- not evaluate the right -- cgit v1.2.3