summaryrefslogtreecommitdiff
path: root/lib/rexml/parsers/xpathparser.rb
diff options
context:
space:
mode:
authorser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-08 02:03:44 +0000
committerser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-09-08 02:03:44 +0000
commitec847fad4e0c1b96c6cf91e7ff14ef0820f7ccc3 (patch)
tree5e6ceeb9a9fcb13bfba05d7eef0b49d398f78a76 /lib/rexml/parsers/xpathparser.rb
parentb2a8ca6dd61358ed72c3d4f5f61767052c9b4d27 (diff)
Merged changes into HEAD 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10888 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 = $'