summaryrefslogtreecommitdiff
path: root/lib/rexml/functions.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/functions.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/functions.rb')
-rw-r--r--lib/rexml/functions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rexml/functions.rb b/lib/rexml/functions.rb
index c09ffdeae7..d741dbdab7 100644
--- a/lib/rexml/functions.rb
+++ b/lib/rexml/functions.rb
@@ -326,8 +326,8 @@ module REXML
else
str = string( object )
#puts "STRING OF #{object.inspect} = #{str}"
- if str =~ /^\d+/
- object.to_s.to_f
+ if str =~ /^-?\.?\d/
+ str.to_f
else
(0.0 / 0.0)
end