diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-09-20 13:47:16 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-09-20 13:47:16 +0900 |
| commit | fa5f5954daa95b6e03bcbe16ffcce4d5e1946146 (patch) | |
| tree | ce6600ce79faca37f95e1c56b2688fbb0bf79c29 /src/class.c | |
| parent | b7e5c86612908dbd670ae2c50de60a079649b7ff (diff) | |
| parent | 292ea06d4d10ca12ec931c73f0ca39db23d66b8e (diff) | |
| download | mruby-fa5f5954daa95b6e03bcbe16ffcce4d5e1946146.tar.gz mruby-fa5f5954daa95b6e03bcbe16ffcce4d5e1946146.zip | |
Merge pull request #4112 from dearblue/fix-outer-module-name
Fix outer module name
Diffstat (limited to 'src/class.c')
| -rw-r--r-- | src/class.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/class.c b/src/class.c index 76c699881..1826095f0 100644 --- a/src/class.c +++ b/src/class.c @@ -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, ">"); } |
