Project

General

Profile

« Previous | Next » 

Revision 37581

array.c: steal shared array's container when ARY_SHARED_NUM == 1

  • array.c (rb_ary_modify): steal shared array's container when ARY_SHARED_NUM == 1. [Feature #6638]
    • Do not allocate new memory in rb_ary_modify when ARY_SHARED_NUM == 1 and length almost same.
    • Store ARY_CAPA instead of RARRAY_LEN in ary_make_shared, to make it useful.
    • Fix rb_ary_sort_bang accordantly.