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

ruby-changes:50921

From: kou <ko1@a...>
Date: Tue, 10 Apr 2018 01:00:54 +0900 (JST)
Subject: [ruby-changes:50921] kou:r63128 (trunk): rexml: Fix a XPath bug of -

kou	2018-04-10 01:00:49 +0900 (Tue, 10 Apr 2018)

  New Revision: 63128

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

  Log:
    rexml: Fix a XPath bug of -
    
    [Bug #14600]
    
    * lib/rexml/parsers/xpathparser.rb: Fix a bug that "N-M" requires a space
      before "-".

  Modified files:
    trunk/lib/rexml/parsers/xpathparser.rb
Index: lib/rexml/parsers/xpathparser.rb
===================================================================
--- lib/rexml/parsers/xpathparser.rb	(revision 63127)
+++ lib/rexml/parsers/xpathparser.rb	(revision 63128)
@@ -421,13 +421,13 @@ module REXML https://github.com/ruby/ruby/blob/trunk/lib/rexml/parsers/xpathparser.rb#L421
         rest
       end
 
-      #| AdditiveExpr ('+' | S '-') MultiplicativeExpr
+      #| AdditiveExpr ('+' | '-') MultiplicativeExpr
       #| MultiplicativeExpr
       def AdditiveExpr path, parsed
         n = []
         rest = MultiplicativeExpr( path, n )
         if rest != path
-          while rest =~ /^\s*(\+| -)\s*/
+          while rest =~ /^\s*(\+|-)\s*/
             if $1[0] == ?+
               n = [ :plus, n, [] ]
             else

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

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