[前][次][番号順一覧][スレッド一覧]

ruby-changes:50875

From: kou <ko1@a...>
Date: Wed, 4 Apr 2018 12:26:06 +0900 (JST)
Subject: [ruby-changes:50875] kou:r63082 (trunk): rexml: Fix a XPath bug of $variable

kou	2018-04-04 12:26:01 +0900 (Wed, 04 Apr 2018)

  New Revision: 63082

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63082

  Log:
    rexml: Fix a  XPath bug of $variable
    
    [Bug #14600]
        
    * lib/rexml/functions.rb: Fix a bug that "$variable" returns
      node instead of ndoe set.

  Modified files:
    trunk/lib/rexml/xpath_parser.rb
Index: lib/rexml/xpath_parser.rb
===================================================================
--- lib/rexml/xpath_parser.rb	(revision 63081)
+++ lib/rexml/xpath_parser.rb	(revision 63082)
@@ -375,7 +375,7 @@ module REXML https://github.com/ruby/ruby/blob/trunk/lib/rexml/xpath_parser.rb#L375
 
         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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]