summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-18 05:54:32 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-18 05:54:32 +0000
commit6429bbad5925caf111810f720f6abfbc36deb350 (patch)
treea062e064511eedc8d8284320b485a64768c81e49 /array.c
parent7497452930b067b1dcdcc204bf9a6f34cd3d5d18 (diff)
* array.c (ary_alloc): slim setup process.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/array.c b/array.c
index 13a2c61..3d387f3 100644
--- a/array.c
+++ b/array.c
@@ -378,10 +378,11 @@ rb_ary_shared_with_p(VALUE ary1, VALUE ary2)
static VALUE
ary_alloc(VALUE klass)
{
- NEWOBJ_OF(ary, struct RArray, klass, T_ARRAY | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0));
- FL_SET_EMBED((VALUE)ary);
- ARY_SET_EMBED_LEN((VALUE)ary, 0);
-
+ NEWOBJ_OF(ary, struct RArray, klass, T_ARRAY | RARRAY_EMBED_FLAG | (RGENGC_WB_PROTECTED_ARRAY ? FL_WB_PROTECTED : 0));
+ /* Created array is:
+ * FL_SET_EMBED((VALUE)ary);
+ * ARY_SET_EMBED_LEN((VALUE)ary, 0);
+ */
return (VALUE)ary;
}