Permalink
Browse files

should not refer Struct class by name; fix #3296

  • Loading branch information...
matz committed Nov 29, 2016
1 parent 630733f commit 37743111d98558e6467f9d5e5498031b3300581f
Showing with 1 addition and 1 deletion.
  1. +1 −1 mrbgems/mruby-struct/src/struct.c
@@ -287,7 +287,7 @@ mrb_struct_s_def(mrb_state *mrb, mrb_value klass)
mrb_ary_set(mrb, rest, i, mrb_symbol_value(id));
}
}
st = make_struct(mrb, name, rest, struct_class(mrb));
st = make_struct(mrb, name, rest, mrb_class_ptr(klass));
if (!mrb_nil_p(b)) {
mrb_yield_with_class(mrb, b, 1, &st, st, mrb_class_ptr(st));
}

0 comments on commit 3774311

Please sign in to comment.