1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Right size the iseq coverage branches tmp array - initializes with 5 elements

This commit is contained in:
Lourens Naudé 2019-10-21 22:31:44 +01:00 committed by 卜部昌平
parent 0547627705
commit 65744fb19e
Notes: git 2019-10-29 11:31:14 +09:00

View file

@ -273,7 +273,7 @@ const ID rb_iseq_shared_exc_local_tbl[] = {idERROR_INFO};
ISEQ_BRANCH_COVERAGE(iseq) && \
(first_line) > 0) { \
VALUE structure = RARRAY_AREF(ISEQ_BRANCH_COVERAGE(iseq), 0); \
branches = rb_ary_tmp_new(0); \
branches = rb_ary_tmp_new(5); \
rb_ary_push(structure, branches); \
rb_ary_push(branches, ID2SYM(rb_intern(type))); \
rb_ary_push(branches, INT2FIX(first_line)); \