diff --git a/ChangeLog b/ChangeLog index 4f2837f4d9..e0ee39eb01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Jul 18 14:51:39 2013 Koichi Sasada + + * array.c (ary_alloc): slim setup process. + Thu Jul 18 14:37:57 2013 Koichi Sasada * string.c (str_alloc): no need to clear RString (already cleared). diff --git a/array.c b/array.c index 13a2c6124d..3d387f33cd 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; }