Skip to content

Commit

Permalink
Outer class may be same as the class; fix #3382
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Jan 24, 2017
1 parent 72bff29 commit b3ce364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -1586,7 +1586,7 @@ mrb_class_path(mrb_state *mrb, struct RClass *c)
if (sym == 0) {
return mrb_nil_value();
}
else if (outer && outer != mrb->object_class) {
else if (outer && outer != c && outer != mrb->object_class) {
mrb_value base = mrb_class_path(mrb, outer);
path = mrb_str_buf_new(mrb, 0);
if (mrb_nil_p(base)) {
Expand Down

0 comments on commit b3ce364

Please sign in to comment.