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
@ -421,13 +421,13 @@ module REXML
|
|||||||
rest
|
rest
|
||||||
end
|
end
|
||||||
|
|
||||||
#| AdditiveExpr ('+' | S '-') MultiplicativeExpr
|
#| AdditiveExpr ('+' | '-') MultiplicativeExpr
|
||||||
#| MultiplicativeExpr
|
#| MultiplicativeExpr
|
||||||
def AdditiveExpr path, parsed
|
def AdditiveExpr path, parsed
|
||||||
n = []
|
n = []
|
||||||
rest = MultiplicativeExpr( path, n )
|
rest = MultiplicativeExpr( path, n )
|
||||||
if rest != path
|
if rest != path
|
||||||
while rest =~ /^\s*(\+| -)\s*/
|
while rest =~ /^\s*(\+|-)\s*/
|
||||||
if $1[0] == ?+
|
if $1[0] == ?+
|
||||||
n = [ :plus, n, [] ]
|
n = [ :plus, n, [] ]
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user