ruby-changes:32474
From: nobu <ko1@a...>
Date: Fri, 10 Jan 2014 18:01:53 +0900 (JST)
Subject: [ruby-changes:32474] nobu:r44553 (trunk): vm_insnhelper.c: boudn method transplanting
nobu 2014-01-10 18:01:44 +0900 (Fri, 10 Jan 2014) New Revision: 44553 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44553 Log: vm_insnhelper.c: boudn method transplanting * vm_insnhelper.c (vm_search_super_method): allow bound method from a module, yet another method transplanting. Modified files: trunk/ChangeLog trunk/vm_insnhelper.c Index: ChangeLog =================================================================== --- ChangeLog (revision 44552) +++ ChangeLog (revision 44553) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Jan 10 18:01:41 2014 Nobuyoshi Nakada <nobu@r...> + + * 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@t...> * insns.def (opt_aref_with): new instruction to optimize Hash#[], Index: vm_insnhelper.c =================================================================== --- vm_insnhelper.c (revision 44552) +++ vm_insnhelper.c (revision 44553) @@ -2004,7 +2004,8 @@ vm_search_super_method(rb_thread_t *th, https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2004 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/