mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rexml: Fix a XPath bug of -
[Bug #14600] * lib/rexml/parsers/xpathparser.rb: Fix a bug that "N-M" requires a space before "-". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bbcab8c6f3
commit
e0f7bb39b7
1 changed files with 2 additions and 2 deletions
|
@ -421,13 +421,13 @@ module REXML
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue