diff options
author | Nobuyoshi Nakada <[email protected]> | 2020-05-08 21:19:39 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2020-05-08 21:23:21 +0900 |
commit | 8a504b224f50d9b6fb32aa090c6125d52151700a (patch) | |
tree | 9492be7b657168de2d5fdcfb993381e74989b56d | |
parent | adf709a78534c1483ba851ccb0490464ca31503c (diff) |
Added GC guard for splatted array
-rw-r--r-- | struct.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 * |