diff options
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*]/ |