diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-08-13 17:44:22 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-08-13 17:44:22 -0700 |
| commit | 8fa02a2cc7c4bcd3d86d6a61ffe97687100b2e52 (patch) | |
| tree | 29fed30c37e42dce08568b51f2c7c0f565d3115b | |
| parent | b50d6468e0e2e244fe0e73a7ec757d4fbaf63963 (diff) | |
| parent | 3385a33e9ecef22a2498248dfa1d3f77896d5faa (diff) | |
| download | mruby-8fa02a2cc7c4bcd3d86d6a61ffe97687100b2e52.tar.gz mruby-8fa02a2cc7c4bcd3d86d6a61ffe97687100b2e52.zip | |
Merge pull request #1470 from carsonmcdonald/morefixfor1467
Tests and another fix for issue #1467
| -rw-r--r-- | src/vm.c | 7 | ||||
| -rw-r--r-- | test/t/module.rb | 22 |
2 files changed, 23 insertions, 6 deletions
@@ -897,12 +897,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self) else { ci->argc = n; } - if (c->tt == MRB_TT_ICLASS) { - ci->target_class = c->c; - } - else { - ci->target_class = c; - } + ci->target_class = c; ci->pc = pc + 1; ci->acc = a; diff --git a/test/t/module.rb b/test/t/module.rb index b192361ca..8655db391 100644 --- a/test/t/module.rb +++ b/test/t/module.rb @@ -481,3 +481,25 @@ assert('Module#inspect') do assert_equal 'Test4to_sModules', Test4to_sModules.inspect end + +assert('Issue 1467') do + module M1 + def initialize() + super() + end + end + + class C1 + include M1 + def initialize() + super() + end + end + + class C2 + include M1 + end + + C1.new + C2.new +end |
