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 | 1d6ca665f5df248c6c838129c62fe67e040c209c (patch) | |
tree | 3adf7459ef7a060a62e32f34b178a2fb80b3bd47 /lib/rexml/parsers/xpathparser.rb | |
parent | c5632105323a2ed48cb319de74d7e938e62b0a21 (diff) |
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
Diffstat (limited to 'lib/rexml/parsers/xpathparser.rb')
-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*]/ |