diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-07-19 08:58:06 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-07-19 08:58:06 +0900 |
| commit | a8bffdae50f623813fbe3294433aef847ed0bd81 (patch) | |
| tree | 3739675830eeb83722f5a879347a550bbcb64c08 /src | |
| parent | 329938ef159d54523cb36aa7069abb7c35ec77d8 (diff) | |
| parent | 468cc34c930bb3169e559354497202edf66c22fc (diff) | |
| download | mruby-a8bffdae50f623813fbe3294433aef847ed0bd81.tar.gz mruby-a8bffdae50f623813fbe3294433aef847ed0bd81.zip | |
Merge branch 'const_set_mod_to_s' of https://github.com/christopheraue/mruby into christopheraue-const_set_mod_to_s
Diffstat (limited to 'src')
| -rw-r--r-- | src/class.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/class.c b/src/class.c index e4e177f04..dd889cbbf 100644 --- a/src/class.c +++ b/src/class.c @@ -2178,6 +2178,9 @@ mrb_mod_const_set(mrb_state *mrb, mrb_value mod) mrb_get_args(mrb, "no", &id, &value); check_const_name_sym(mrb, id); + if (mrb_type(value) == MRB_TT_CLASS || mrb_type(value) == MRB_TT_MODULE) { + setup_class(mrb, mrb_class_ptr(mod), mrb_class_ptr(value), id); + } mrb_const_set(mrb, mod, id, value); return value; } |
