Commit 40c18fca authored by Tomoyuki Sahara's avatar Tomoyuki Sahara

self must be the newly created object in initialization block; close #1858

parent 93694fe5
......@@ -382,7 +382,7 @@ mrb_struct_s_def(mrb_state *mrb, mrb_value klass)
}
st = make_struct(mrb, name, rest, struct_class(mrb));
if (!mrb_nil_p(b)) {
mrb_funcall(mrb, b, "call", 1, st);
mrb_yield_internal(mrb, b, 1, &st, st, mrb_class_ptr(klass));
}
return st;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment