Merge pull request #4112 from dearblue/fix-outer-module-name

Fix outer module name
This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-09-20 13:47:16 +09:00
committed by GitHub
+2 -1
View File
@@ -1701,7 +1701,8 @@ mrb_class_name(mrb_state *mrb, struct RClass* c)
{
mrb_value path = mrb_class_path(mrb, c);
if (mrb_nil_p(path)) {
path = mrb_str_new_lit(mrb, "#<Class:");
path = c->tt == MRB_TT_MODULE ? mrb_str_new_lit(mrb, "#<Module:") :
mrb_str_new_lit(mrb, "#<Class:");
mrb_str_concat(mrb, path, mrb_ptr_to_str(mrb, c));
mrb_str_cat_lit(mrb, path, ">");
}