Skip to content

Commit

Permalink
Use rb_ary_tmp_new only for internal arrays
Browse files Browse the repository at this point in the history
rb_ary_tmp_new sets the klass to 0, so it should only be used for
internal arrays.
  • Loading branch information
peterzhu2118 committed Jul 22, 2022
1 parent 244bda7 commit 98a8a49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compile.c
Expand Up @@ -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++) {
Expand Down

0 comments on commit 98a8a49

Please sign in to comment.