From 7a2e0d6cf596b1ea6220b5bd1fb16abdc6859f13 Mon Sep 17 00:00:00 2001 From: Carson McDonald Date: Tue, 13 Aug 2013 11:38:27 -0400 Subject: This check and class change is redundant because it is done in class.c#mrb_include_module --- src/vm.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/vm.c b/src/vm.c index 3a149258f..3765d0cc2 100644 --- a/src/vm.c +++ b/src/vm.c @@ -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; -- cgit v1.2.3 From 3385a33e9ecef22a2498248dfa1d3f77896d5faa Mon Sep 17 00:00:00 2001 From: Carson McDonald Date: Tue, 13 Aug 2013 11:39:30 -0400 Subject: Add two tests for issue #1467 --- test/t/module.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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 -- cgit v1.2.3