summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-10 09:01:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-10 09:01:44 +0000
commitaee9f2879d02899a83bcba80010516e9c6d8fda7 (patch)
tree852c15178da7e586527bc8a43bbad72f3660509b /vm_insnhelper.c
parent95779deac77d57068544fe2dcbafcb4170641dd8 (diff)
vm_insnhelper.c: boudn method transplanting
* vm_insnhelper.c (vm_search_super_method): allow bound method from a module, yet another method transplanting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index eb3ba37623..edf4e46652 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -2004,7 +2004,8 @@ vm_search_super_method(rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_inf
current_defined_class = RCLASS_REFINED_CLASS(current_defined_class);
}
- if (!FL_TEST(current_defined_class, RMODULE_INCLUDED_INTO_REFINEMENT) &&
+ if (BUILTIN_TYPE(current_defined_class) != T_MODULE &&
+ !FL_TEST(current_defined_class, RMODULE_INCLUDED_INTO_REFINEMENT) &&
!rb_obj_is_kind_of(ci->recv, current_defined_class)) {
VALUE m = RB_TYPE_P(current_defined_class, T_ICLASS) ?
RBASIC(current_defined_class)->klass : current_defined_class;