`mrb_class_real()` did not work for `BasicObject`; fix #4037

parent 55edae02
......@@ -1763,10 +1763,10 @@ mrb_class_path(mrb_state *mrb, struct RClass *c)
MRB_API struct RClass*
mrb_class_real(struct RClass* cl)
{
if (cl == 0)
return NULL;
if (cl == 0) return NULL;
while ((cl->tt == MRB_TT_SCLASS) || (cl->tt == MRB_TT_ICLASS)) {
cl = cl->super;
if (cl == 0) return NULL;
}
return cl;
}
......
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