From 29cef5f795043a048a58874d90de0dfe01aa12ea Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 2 Oct 2002 16:45:35 +0000 Subject: use Object#class instead of deprecated Object#type. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/date/format.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/date/format.rb') diff --git a/lib/date/format.rb b/lib/date/format.rb index e099854aa4..ac096f0751 100644 --- a/lib/date/format.rb +++ b/lib/date/format.rb @@ -483,13 +483,13 @@ class Date when '%r'; o << strftime('%I:%M:%S %p') # P2,ID when '%S'; o << '%02d' % sec when '%s' # TZ,GL - d = ajd - type.jd_to_ajd(type.civil_to_jd(1970,1,1), 0) + d = ajd - self.class.jd_to_ajd(type.civil_to_jd(1970,1,1), 0) s = (d * 86400).to_i o << '%d' % s when '%T'; o << strftime('%H:%M:%S') # P2,ID when '%t'; o << "\t" # P2,ID when '%U', '%W' - a = type.civil_to_jd(year, 1, 1, ns?) + 6 + a = self.class.civil_to_jd(year, 1, 1, ns?) + 6 k = if c == '%U' then 0 else 1 end w = (jd - (a - ((a - k) + 1) % 7) + 7) / 7 o << '%02d' % w -- cgit v1.2.3