summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-24 23:04:52 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-24 23:04:52 +0000
commita95d67ebf754728986f2506ea507be14dd4d24a4 (patch)
tree333e2218750093a3de2a16581a8b2b5ecccdf20b
parente32943363088035c04b63b54cbe5179c4f5cd527 (diff)
updated based on date2 3.9.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/date/format.rb10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 06d86c967d..69fb3c41cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Oct 25 07:59:42 2006 Tadayoshi Funaba <tadf@dotrb.org>
+
+ * lib/date/format.rb: updated based on date2 3.9.6.
+ [ruby-core:09323]
+
Wed Oct 25 00:58:19 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* win32/mkexports.rb, win32/resource.rb: use unique variable names.
diff --git a/lib/date/format.rb b/lib/date/format.rb
index 55f7d95811..14726b081c 100644
--- a/lib/date/format.rb
+++ b/lib/date/format.rb
@@ -1,5 +1,5 @@
# format.rb: Written by Tadayoshi Funaba 1999-2006
-# $Id: format.rb,v 2.27 2006-09-30 13:10:32+09 tadf Exp $
+# $Id: format.rb,v 2.28 2006-10-25 06:45:12+09 tadf Exp $
require 'rational'
@@ -280,10 +280,10 @@ class Date
when /\A(:{0,3})z/
t = $1.size
sign = if offset < 0 then -1 else +1 end
- fr = offset.abs.to_f
- hh, fr = fr.divmod(1.0/24)
- mm, fr = fr.divmod(1.0/1440)
- ss, fr = fr.divmod(1.0/86400)
+ fr = offset.abs
+ hh, fr = fr.divmod(1.to_r/24)
+ mm, fr = fr.divmod(1.to_r/1440)
+ ss, fr = fr.divmod(1.to_r/86400)
if t == 3
if ss.nonzero? then t = 2
elsif mm.nonzero? then t = 1