From 5f66e0959041f9256ac9d9e2775d76df099506f7 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 31 Oct 2006 08:08:46 +0000 Subject: * time.c (time_dup): duplicate the class of original time. [ruby-core:09357] * lib/time.rb (Time::make_time, Time::rfc2822, Time::httpdate): should respect subclasses. [ruby-core:09357] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'time.c') diff --git a/time.c b/time.c index b856228518..d919c631f4 100644 --- a/time.c +++ b/time.c @@ -1066,7 +1066,7 @@ static VALUE time_dup(time) VALUE time; { - VALUE dup = time_s_alloc(rb_cTime); + VALUE dup = time_s_alloc(CLASS_OF(time)); time_init_copy(dup, time); return dup; } -- cgit v1.2.3