1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Added GC guard for splatted array

This commit is contained in:
Nobuyoshi Nakada 2020-05-08 21:19:39 +09:00
parent adf709a785
commit 8a504b224f
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -659,7 +659,9 @@ rb_struct_initialize_m(int argc, const VALUE *argv, VALUE self)
VALUE
rb_struct_initialize(VALUE self, VALUE values)
{
return rb_struct_initialize_m(RARRAY_LENINT(values), RARRAY_CONST_PTR(values), self);
rb_struct_initialize_m(RARRAY_LENINT(values), RARRAY_CONST_PTR(values), self);
RB_GC_GUARD(values);
return Qnil;
}
static VALUE *