mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
95779deac7
commit
aee9f2879d
2 changed files with 7 additions and 1 deletions
|
@ -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#[],
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue