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
commit0f519375ab0fe774ccbca66104fe6234709cd466 (patch)
tree1a6f90a433512f1f5be08298ab8ccee9feb2d9ba /time.c
parentd9ec86f41017e2adeae4fa087fca88593bfa1a6b (diff)
downloadbundler-0f519375ab0fe774ccbca66104fe6234709cd466.tar.gz
* 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
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 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;
}