summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'time.c')
-rw-r--r--time.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/time.c b/time.c
index b0a2be2455..0d771d2715 100644
--- a/time.c
+++ b/time.c
@@ -3425,8 +3425,7 @@ time_init_copy(VALUE copy, VALUE time)
{
struct time_object *tobj, *tcopy;
- if (copy == time) return copy;
- time_modify(copy);
+ if (!OBJ_INIT_COPY(copy, time)) return copy;
GetTimeval(time, tobj);
GetTimeval(copy, tcopy);
MEMCPY(tcopy, tobj, struct time_object, 1);