Should specify instance type of Structs; fix #3591

This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-04-05 17:52:26 +09:00
parent 2daebfb6a7
commit bd7bf260e8
+1
View File
@@ -679,6 +679,7 @@ mrb_mruby_struct_gem_init(mrb_state* mrb)
{
struct RClass *st;
st = mrb_define_class(mrb, "Struct", mrb->object_class);
MRB_SET_INSTANCE_TT(st, MRB_TT_ARRAY);
mrb_define_class_method(mrb, st, "new", mrb_struct_s_def, MRB_ARGS_ANY()); /* 15.2.18.3.1 */