diff options
| author | ser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-08 01:53:33 +0000 |
|---|---|---|
| committer | ser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-08 01:53:33 +0000 |
| commit | 0dd6985ec5a467375d8cf63193fe31a3181a9699 (patch) | |
| tree | 801ef38e4081aec080ac1ce1d3ca3f1273ba861e /lib/rexml/functions.rb | |
| parent | 13578f377dfa575ee44980e08a1dae0190af8c2a (diff) | |
| download | ruby-0dd6985ec5a467375d8cf63193fe31a3181a9699.tar.gz ruby-0dd6985ec5a467375d8cf63193fe31a3181a9699.tar.xz ruby-0dd6985ec5a467375d8cf63193fe31a3181a9699.zip | |
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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/functions.rb')
| -rw-r--r-- | lib/rexml/functions.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rexml/functions.rb b/lib/rexml/functions.rb index c09ffdeae..d741dbdab 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 |
