summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-28 23:21:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-28 23:21:14 +0000
commit24c3331bdfa47339de70e5866132bf872e6d9d90 (patch)
treeab2a6e50338fedcb0478b2b51aa518869f2d99f4 /vm_insnhelper.c
parente521a19aa4ac1a7b05bb9bea2af09a8016931de9 (diff)
vm_insnhelper.c: missing super in method module
* vm_insnhelper.c (vm_search_super_method): direct superclass of a module is found when super called in a Method object generated a method defined in a module, call method_missing in that case. [ruby-core:59358] [Bug #9315] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index c8cbaa07bf..8694f524f6 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -2024,6 +2024,11 @@ vm_search_super_method(rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_inf
" by define_method() is not supported."
" Specify all arguments explicitly.");
}
+ if (!ci->klass) {
+ ci->aux.missing_reason = NOEX_SUPER;
+ CI_SET_FASTPATH(ci, vm_call_method_missing, 1);
+ return;
+ }
/* TODO: use inline cache */
ci->me = rb_method_entry(ci->klass, ci->mid, &ci->defined_class);