diff options
Diffstat (limited to 'lib/rexml/parsers/xpathparser.rb')
-rw-r--r-- | lib/rexml/parsers/xpathparser.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/rexml/parsers/xpathparser.rb b/lib/rexml/parsers/xpathparser.rb index 6bac852d6b..6f5b21cd93 100644 --- a/lib/rexml/parsers/xpathparser.rb +++ b/lib/rexml/parsers/xpathparser.rb @@ -596,7 +596,13 @@ module REXML parsed << :function parsed << fname path = FunctionCall(path, parsed) - when LITERAL, NUMBER + when NUMBER + #puts "LITERAL or NUMBER: #$1" + varname = $1.nil? ? $2 : $1 + path = $' + parsed << :literal + parsed << (varname.include?('.') ? varname.to_f : varname.to_i) + when LITERAL #puts "LITERAL or NUMBER: #$1" varname = $1.nil? ? $2 : $1 path = $' |