Skip to content
Permalink
Browse files Browse the repository at this point in the history
mrb_class_real() did not work for BasicObject; fix #4037
  • Loading branch information
matz committed Jun 8, 2018
1 parent 55edae0 commit faa4eaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/class.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit faa4eaf

Please sign in to comment.