summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index 648946beb3..929968c4cb 100644
--- a/object.c
+++ b/object.c
@@ -319,7 +319,7 @@ init_copy(VALUE dest, VALUE obj)
// If the object is frozen, the "dup"'d object will *not* be frozen,
// so we need to copy the frozen shape's parent to the new object.
if (rb_shape_frozen_shape_p(shape_to_set)) {
- shape_to_set = shape_to_set->parent;
+ shape_to_set = rb_shape_get_shape_by_id(shape_to_set->parent_id);
}
// shape ids are different