summaryrefslogtreecommitdiff
path: root/lib/rexml/parsers/xpathparser.rb
diff options
context:
space:
mode:
authorser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-08 01:53:33 +0000
committerser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-08 01:53:33 +0000
commit8935ae596b53e044f77da7ef4e061fc7d11751af (patch)
tree801ef38e4081aec080ac1ce1d3ca3f1273ba861e /lib/rexml/parsers/xpathparser.rb
parent1838ddd7aec73c111e5d8bc12efc1e14bc893384 (diff)
Merged changes from REXML 3.1.5.
The list of bug fixes/enhancements is at: http://www.germane-software.com/projects/rexml/query?status=closed&milestone=3.1.5 Merged Nobu's & DrBrain's changes into REXML head. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/parsers/xpathparser.rb')
-rw-r--r--lib/rexml/parsers/xpathparser.rb8
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 = $'