diff options
| author | Kouhei Sutou <[email protected]> | 2016-01-11 00:34:15 +0900 |
|---|---|---|
| committer | Kouhei Sutou <[email protected]> | 2016-01-11 00:34:15 +0900 |
| commit | ad492eb9f3f217f60fd539bc23cce10ad40a36d1 (patch) | |
| tree | 5c690b2cf222ec558519ab0df93131e8188579f4 /src/variable.c | |
| parent | e132de9e8eaf095f6f8b826e34a1c145403c3311 (diff) | |
| download | mruby-ad492eb9f3f217f60fd539bc23cce10ad40a36d1.tar.gz mruby-ad492eb9f3f217f60fd539bc23cce10ad40a36d1.zip | |
Fix class variable reference in module
Fix #3079
Diffstat (limited to 'src/variable.c')
| -rw-r--r-- | src/variable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/variable.c b/src/variable.c index bda7b2a98..3b5674923 100644 --- a/src/variable.c +++ b/src/variable.c @@ -773,7 +773,7 @@ mrb_mod_cv_get(mrb_state *mrb, struct RClass * c, mrb_sym sym) klass = mrb_obj_iv_get(mrb, (struct RObject *)cls, mrb_intern_lit(mrb, "__attached__")); c = mrb_class_ptr(klass); - if (c->tt == MRB_TT_CLASS) { + if (c->tt == MRB_TT_CLASS || c->tt == MRB_TT_MODULE) { while (c) { if (c->iv && iv_get(mrb, c->iv, sym, &v)) { return v; |
