summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/variable.c b/variable.c
index d7f9579d9c..2f8a606930 100644
--- a/variable.c
+++ b/variable.c
@@ -2438,6 +2438,9 @@ rb_copy_generic_ivar(VALUE dest, VALUE obj)
clear:
if (FL_TEST(dest, FL_EXIVAR)) {
+#if SHAPE_IN_BASIC_FLAGS
+ RBASIC_SET_SHAPE_ID(dest, ROOT_SHAPE_ID);
+#endif
rb_free_generic_ivar(dest);
FL_UNSET(dest, FL_EXIVAR);
}