diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-04 06:36:06 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-04 06:36:06 +0000 |
commit | 1be2746bbfff455d6ecc99e6e6920504305fd9ff (patch) | |
tree | 3adf7459ef7a060a62e32f34b178a2fb80b3bd47 | |
parent | 6b314ef3c3b57bc3c81b5e6b430c4e0d2adeed97 (diff) | |
download | ruby-1be2746bbfff455d6ecc99e6e6920504305fd9ff.tar.gz |
rexml: Fix a XPath bug of function()/path
[Bug #14600]
* lib/rexml/functions.rb: Fix a bug that "function()/path" always returns
nothing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/rexml/parsers/xpathparser.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/rexml/parsers/xpathparser.rb b/lib/rexml/parsers/xpathparser.rb index 32b70bb798..5e0e429240 100644 --- a/lib/rexml/parsers/xpathparser.rb +++ b/lib/rexml/parsers/xpathparser.rb @@ -515,7 +515,9 @@ module REXML rest = FilterExpr( path, n ) if rest != path if rest and rest[0] == ?/ - return RelativeLocationPath(rest, n) + rest = RelativeLocationPath(rest, n) + parsed.concat(n) + return rest end end rest = LocationPath(rest, n) if rest =~ /\A[\/\.\@\[\w*]/ |