ruby-changes:8674
From: tadf <ko1@a...>
Date: Tue, 11 Nov 2008 20:44:19 +0900 (JST)
Subject: [ruby-changes:8674] Ruby:r20209 (trunk): * lib/date.rb (inspect): reverted the previous change.
tadf 2008-11-11 20:42:46 +0900 (Tue, 11 Nov 2008) New Revision: 20209 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20209 Log: * lib/date.rb (inspect): reverted the previous change. Modified files: trunk/ChangeLog trunk/lib/date.rb trunk/test/date/test_date.rb trunk/test/date/test_date_attr.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 20208) +++ ChangeLog (revision 20209) @@ -1,3 +1,7 @@ +Tue Nov 11 20:39:27 2008 Tadayoshi Funaba <tadf@d...> + + * lib/date.rb (inspect): reverted the previous change. + Tue Nov 11 17:35:25 2008 NAKAMURA Usaku <usa@r...> * win32/win32.c (rb_w32_accept): secure fd before accept because if Index: lib/date.rb =================================================================== --- lib/date.rb (revision 20208) +++ lib/date.rb (revision 20209) @@ -1470,9 +1470,7 @@ def hash() @ajd.hash end # Return internal object state as a programmer-readable string. - def inspect - format('#<%s: %s (%s,%s,%s)>', self.class, to_s, @ajd, @of, @sg) - end + def inspect() format('#<%s: %s,%s,%s>', self.class, @ajd, @of, @sg) end # Return the date as a human-readable string. # Index: test/date/test_date_attr.rb =================================================================== --- test/date/test_date_attr.rb (revision 20208) +++ test/date/test_date_attr.rb (revision 20209) @@ -9,10 +9,10 @@ [date, datetime].each_with_index do |d, i| if i == 0 - assert_match(/\#<Date\d?: 1965-05-23 \(4877807\/2,0,2299161\)>/, + assert_match(/\#<Date\d?: 4877807\/2,0,2299161>/, d.inspect) else - assert_match(/\#<DateTime\d?: 1965-05-23T22:31:59\+00:00 \(210721343519\/86400,0,2299161\)>/, + assert_match(/\#<DateTime\d?: 210721343519\/86400,0,2299161>/, d.inspect) end Index: test/date/test_date.rb =================================================================== --- test/date/test_date.rb (revision 20208) +++ test/date/test_date.rb (revision 20209) @@ -41,9 +41,9 @@ assert_instance_of(DateSub, DateSub.today) assert_instance_of(DateTimeSub, DateTimeSub.now) - assert_equal('#<DateSub: -4712-01-01 (-1/2,0,2299161)>', d.inspect) + assert_equal('#<DateSub: -1/2,0,2299161>', d.inspect) assert_equal('-4712-01-01', d.to_s) - assert_equal('#<DateTimeSub: -4712-01-01T00:00:00+00:00 (-1/2,0,2299161)>', dt.inspect) + assert_equal('#<DateTimeSub: -1/2,0,2299161>', dt.inspect) assert_equal('-4712-01-01T00:00:00+00:00', dt.to_s) d2 = d + 1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/