1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
kou 2018-04-04 06:36:06 +00:00
parent c563210532
commit 1d6ca665f5

View file

@ -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*]/