summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-31 08:08:46 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-10-31 08:08:46 +0000
commit5f66e0959041f9256ac9d9e2775d76df099506f7 (patch)
tree447c9985cb770e41c633f08615b3534f78dfaf0a /time.c
parent12585d04771596124b0c2e96ed013406cc38fc83 (diff)
* 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
Diffstat (limited to 'time.c')
-rw-r--r--time.c2
1 files changed, 1 insertions, 1 deletions
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;
}