From 98a8a496bab077b22290dd25d7f8453d1e73a1ac Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 22 Jul 2022 15:44:32 -0400 Subject: [PATCH] Use rb_ary_tmp_new only for internal arrays rb_ary_tmp_new sets the klass to 0, so it should only be used for internal arrays. --- compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compile.c b/compile.c index 193a9a1c6d..be974d571a 100644 --- a/compile.c +++ b/compile.c @@ -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->frozen ? rb_ary_tmp_new(len) : rb_ary_new_capa(len); + VALUE ary = header->internal ? rb_ary_tmp_new(len) : rb_ary_new_capa(len); int i; for (i=0; i