Skip to content
Permalink
Browse files
Struct may not be initialized in #to_h; fix #3607
  • Loading branch information
matz committed Apr 13, 2017
1 parent aec121f commit 17377af
Showing 1 changed file with 1 addition and 1 deletion.
@@ -638,7 +638,7 @@ mrb_struct_to_h(mrb_state *mrb, mrb_value self)
mrb_value members, ret;
mrb_int i;

members = struct_s_members(mrb, mrb_class(mrb, self));
members = struct_members(mrb, self);
ret = mrb_hash_new_capa(mrb, RARRAY_LEN(members));

for (i = 0; i < RARRAY_LEN(members); ++i) {

0 comments on commit 17377af

Please sign in to comment.