ruby-changes:72660
From: Peter <ko1@a...>
Date: Sat, 23 Jul 2022 04:45:25 +0900 (JST)
Subject: [ruby-changes:72660] 98a8a496ba (master): Use rb_ary_tmp_new only for internal arrays
https://git.ruby-lang.org/ruby.git/commit/?id=98a8a496ba From 98a8a496bab077b22290dd25d7f8453d1e73a1ac Mon Sep 17 00:00:00 2001 From: Peter Zhu <peter@p...> Date: Fri, 22 Jul 2022 15:44:32 -0400 Subject: 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 https://github.com/ruby/ruby/blob/trunk/compile.c#L12349 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<len; i++) { -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/