summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'array.c')
-rw-r--r--array.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/array.c b/array.c
index 345a60bfc6..7f423ed3bb 100644
--- a/array.c
+++ b/array.c
@@ -456,6 +456,7 @@ rb_ary_new_from_values(long n, const VALUE *elts)
ary = rb_ary_new2(n);
if (n > 0 && elts) {
+ assert(!OBJ_PROMOTED(obj));
RARRAY_PTR_USE(ary, ptr, {
MEMCPY(ptr, elts, VALUE, n); /* new array is not old gen */
});