diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-09 16:00:49 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-09 16:00:49 +0000 |
commit | 307dcecbed3e375d1cffc685644fdeaaf1d00c4f (patch) | |
tree | 193baa803842ca4cd94d6ad2fbe371e2bf7ab63c /lib | |
parent | 2e2c49101ef05b0462a3d60777f22cc8230e0639 (diff) | |
download | ruby-307dcecbed3e375d1cffc685644fdeaaf1d00c4f.tar.gz |
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.rb | 4 |
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 |