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 17377af984feb8ef44a0b0f1ac30d87033be5d1a
Showing with 1 addition and 1 deletion.
  1. +1 −1 mrbgems/mruby-struct/src/struct.c
@@ -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.