diff options
author | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-17 12:05:43 +0000 |
---|---|---|
committer | tadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-17 12:05:43 +0000 |
commit | 49622de368339b214b3267045f68c3f4bae7e4f8 (patch) | |
tree | 5d1264a7bb74f0f79d9ad5f38e53acb0b45841e0 /lib/date.rb | |
parent | 85e6dff16563ae2233c8d1c162a441dc386a56c4 (diff) |
* lib/date.rb (Date::Infinity#<=>): didn't work. A patch from
Dirkjan Bussink <d.bussink AT gmail.com> [ruby-core:15098].
This is a bug obviously. However it didn't affect the library's
functions.
* lib/date.rb, lib/date/format.rb: some trivial changes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/date.rb')
-rw-r--r-- | lib/date.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/date.rb b/lib/date.rb index 61ba06c79d..a1d70139aa 100644 --- a/lib/date.rb +++ b/lib/date.rb @@ -6,7 +6,7 @@ # Documentation: William Webber <[email protected]> # #-- -# $Id: date.rb,v 2.36 2008-01-12 10:54:29+09 tadf Exp $ +# $Id: date.rb,v 2.37 2008-01-17 20:16:31+09 tadf Exp $ #++ # # == Overview @@ -275,8 +275,8 @@ class Date def <=> (other) case other - when Infinity; d <=> other.d - when Numeric; d + when Infinity; return d <=> other.d + when Numeric; return d else begin l, r = other.coerce(self) @@ -535,7 +535,7 @@ class Date if Integer === h && Integer === min && Integer === s Rational(h * 3600 + min * 60 + s, 86400) # 4p else - h.to_r/24 + min.to_r/1440 + s.to_r/86400 + (h * 3600 + min * 60 + s).to_r/86400 # 4p end end end |