From b0e3af492216f9517480208bffb99656cd122a89 Mon Sep 17 00:00:00 2001 From: tadf Date: Tue, 11 Nov 2008 11:42:46 +0000 Subject: [PATCH] * lib/date.rb (inspect): reverted the previous change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ lib/date.rb | 4 +--- test/date/test_date.rb | 4 ++-- test/date/test_date_attr.rb | 4 ++-- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 405d1e774c..0e07acfa01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Nov 11 20:39:27 2008 Tadayoshi Funaba + + * lib/date.rb (inspect): reverted the previous change. + Tue Nov 11 17:35:25 2008 NAKAMURA Usaku * win32/win32.c (rb_w32_accept): secure fd before accept because if diff --git a/lib/date.rb b/lib/date.rb index 2c9792562b..3da3d21f8b 100644 --- a/lib/date.rb +++ b/lib/date.rb @@ -1470,9 +1470,7 @@ class Date 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. # diff --git a/test/date/test_date.rb b/test/date/test_date.rb index f2be9e24c4..de7e4838c3 100644 --- a/test/date/test_date.rb +++ b/test/date/test_date.rb @@ -41,9 +41,9 @@ class TestDate < Test::Unit::TestCase assert_instance_of(DateSub, DateSub.today) assert_instance_of(DateTimeSub, DateTimeSub.now) - assert_equal('#', d.inspect) + assert_equal('#', d.inspect) assert_equal('-4712-01-01', d.to_s) - assert_equal('#', dt.inspect) + assert_equal('#', dt.inspect) assert_equal('-4712-01-01T00:00:00+00:00', dt.to_s) d2 = d + 1 diff --git a/test/date/test_date_attr.rb b/test/date/test_date_attr.rb index 5187d5d3e5..2e71b5f501 100644 --- a/test/date/test_date_attr.rb +++ b/test/date/test_date_attr.rb @@ -9,10 +9,10 @@ class TestDateAttr < Test::Unit::TestCase [date, datetime].each_with_index do |d, i| if i == 0 - assert_match(/\#/, + assert_match(/\#/, d.inspect) else - assert_match(/\#/, + assert_match(/\#/, d.inspect) end