aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authorLourens Naudé <lourens@bearmetal.eu>2019-10-21 22:31:44 +0100
committer卜部昌平 <shyouhei@ruby-lang.org>2019-10-29 11:30:49 +0900
commit65744fb19efa7786c6b528d81328b641ea2e7cd5 (patch)
tree286b59410f0f545e219325c4bffdba3c3d29b8c9 /compile.c
parent0547627705ba2afd9b782ac511c825bfe36f052f (diff)
downloadruby-65744fb19efa7786c6b528d81328b641ea2e7cd5.tar.gz
Right size the iseq coverage branches tmp array - initializes with 5 elements
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index a478324261..0b90a360a0 100644
--- a/compile.c
+++ b/compile.c
@@ -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)); \