diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-10 07:23:36 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-10 07:23:36 +0000 |
commit | f8ba9a1f605b264069591664eae866b643c74db4 (patch) | |
tree | 5c727ad8b3d414e525ed592edc72e7d58d5090b1 /array.c | |
parent | dd96561f76f8c3ae7d60f5ace40ce32f4f1d73c8 (diff) | |
download | ruby-f8ba9a1f605b264069591664eae866b643c74db4.tar.gz |
* array.c (rb_ary_new_from_values): add assertion
(ary should be young object).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 */ }); |