summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compile.c b/compile.c
index 7aca48d8dc..193a9a1c6d 100644
--- a/compile.c
+++ b/compile.c
@@ -4369,7 +4369,7 @@ compile_array(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *node, int pop
if ((first_chunk && stack_len == 0 && !node_tmp) || count >= min_tmp_ary_len) {
/* The literal contains only optimizable elements, or the subarray is long enough */
- VALUE ary = rb_ary_literal_new(count);
+ VALUE ary = rb_ary_tmp_new(count);
/* Create a hidden array */
for (; count; count--, node = node->nd_next)
@@ -12349,7 +12349,7 @@ ibf_load_object_array(const struct ibf_load *load, const struct ibf_object_heade
const long len = (long)ibf_load_small_value(load, &reading_pos);
- VALUE ary = header->internal ? rb_ary_literal_new(len) : rb_ary_new_capa(len);
+ VALUE ary = header->frozen ? rb_ary_tmp_new(len) : rb_ary_new_capa(len);
int i;
for (i=0; i<len; i++) {