summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-05 11:13:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-05 11:13:18 +0000
commit2073258a7d192e8d2bc853e10464a7a5fcac8f2d (patch)
tree9c7290dc3a782104d0b14f2feaffc6131744f4e2 /time.c
parentb1ae6e473e1c1865a1dcd5e4e5d242345c20cc77 (diff)
obj_init_copy
* object.c (rb_obj_init_copy): should check if trusted too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 b0a2be2..0d771d2 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);