aboutsummaryrefslogtreecommitdiffstats
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
parent95779deac77d57068544fe2dcbafcb4170641dd8 (diff)
downloadruby-aee9f2879d02899a83bcba80010516e9c6d8fda7.tar.gz
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
-rw-r--r--ChangeLog5
-rw-r--r--vm_insnhelper.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b6c71fa84d..66d483cd05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jan 10 18:01:41 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_insnhelper.c (vm_search_super_method): allow bound method from a
+ module, yet another method transplanting.
+
Fri Jan 10 13:34:04 2014 Aman Gupta <ruby@tmm1.net>
* insns.def (opt_aref_with): new instruction to optimize Hash#[],
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;