summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-11 06:05:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-11 06:05:28 +0000
commit46f578d806df70c4cae43b614e56558977a4cc44 (patch)
tree41ecd67b39c9a6b3ab6e2530f2b485048744078c /vm_insnhelper.c
parent2329a1a88dbbb5b1c9323d485cc95e30f7acbdf8 (diff)
proc.c: fix super in bound UnboundMethod
* proc.c (rb_method_call_with_block, umethod_bind): call with IClass including the module for a module instance method. [ruby-core:61936] [Bug #9721] * vm_insnhelper.c (vm_search_super_method): allow bound UnboundMethod case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 8627701b3e..dc752e7963 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -2034,6 +2034,7 @@ vm_search_super_method(rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_inf
}
if (BUILTIN_TYPE(current_defined_class) != T_MODULE &&
+ BUILTIN_TYPE(current_defined_class) != T_ICLASS && /* bound UnboundMethod */
!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) ?