summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/array.c b/array.c
index 7249ed7112..1112a22238 100644
--- a/array.c
+++ b/array.c
@@ -343,6 +343,11 @@ rb_ary_modify(VALUE ary)
ARY_SET_CAPA(ary, len);
ARY_SET_PTR(ary, ptr);
}
+
+ /* TODO: age2 promotion, OBJ_PROMOTED() checks not infant. */
+ if (OBJ_PROMOTED(ary) && !OBJ_PROMOTED(shared)) {
+ rb_gc_writebarrier_remember_promoted(ary);
+ }
}
}