From 0f519375ab0fe774ccbca66104fe6234709cd466 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/trunk@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 c9be587c47..68ed3844ac 100644 --- a/time.c +++ b/time.c @@ -1019,7 +1019,7 @@ time_init_copy(VALUE copy, VALUE time) static VALUE time_dup(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.1