summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-09 16:00:49 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-04-09 16:00:49 +0000
commite0f7bb39b72f060232e84303ea7a4202883a959d (patch)
tree193baa803842ca4cd94d6ad2fbe371e2bf7ab63c /lib
parentbbcab8c6f3d362f62bf1914298b95bfb1e7a84c3 (diff)
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
Diffstat (limited to 'lib')
-rw-r--r--lib/rexml/parsers/xpathparser.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rexml/parsers/xpathparser.rb b/lib/rexml/parsers/xpathparser.rb
index 5e0e429240..9577b6dcbe 100644
--- a/lib/rexml/parsers/xpathparser.rb
+++ b/lib/rexml/parsers/xpathparser.rb
@@ -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