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.
This commit is contained in:
Peter Zhu 2022-07-22 15:44:32 -04:00
parent 244bda7efd
commit 98a8a496ba

View File

@ -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<len; i++) {