Skip to content

Commit

Permalink
xpath: fix a bug that #abbreviate can't handle function arguments
Browse files Browse the repository at this point in the history
GitHub: fix GH-95

Reported by pulver. Thanks!!!
  • Loading branch information
kou committed May 25, 2023
1 parent f44e88d commit 54b7109
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rexml/parsers/xpathparser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ def predicate_to_string( path, &block )
name = path.shift
string << name
string << "( "
string << predicate_to_string( path.shift, &block )
path.shift.each_with_index do |argument, i|
string << ", " if i > 0
string << predicate_to_string(argument, &block)
end
string << " )"
when :literal
path.shift
Expand Down

0 comments on commit 54b7109

Please sign in to comment.