1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
kazu 2015-06-01 15:00:17 +00:00
parent ec38e0ead2
commit abe5b048bd
3 changed files with 4 additions and 4 deletions

View file

@ -79,7 +79,7 @@ Sun May 31 03:36:42 2015 Koichi Sasada <ko1@atdot.net>
Now, inter class/method alias creates new method entry
VM_METHOD_TYPE_ALIAS, which has an original method entry.
* vm_insnhelper.c (find_defiend_class_by_owner): added.
* vm_insnhelper.c (find_defined_class_by_owner): added.
Search corresponding defined_class from owner class/module.
* vm_method.c (rb_method_entry_get_without_cache): return me->klass

View file

@ -220,7 +220,7 @@ vm_call0_body(rb_thread_t* th, rb_call_info_t *ci, const VALUE *argv)
case VM_METHOD_TYPE_ALIAS:
{
ci->me = ci->me->def->body.alias.original_me;
ci->defined_class = find_defiend_class_by_owner(ci->defined_class, ci->me->klass);
ci->defined_class = find_defined_class_by_owner(ci->defined_class, ci->me->klass);
goto again;
}
case VM_METHOD_TYPE_MISSING:

View file

@ -1702,7 +1702,7 @@ current_method_entry(rb_thread_t *th, rb_control_frame_t *cfp)
}
static VALUE
find_defiend_class_by_owner(VALUE current_class, VALUE target_owner)
find_defined_class_by_owner(VALUE current_class, VALUE target_owner)
{
VALUE klass = current_class;
@ -1793,7 +1793,7 @@ vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
}
case VM_METHOD_TYPE_ALIAS: {
ci->me = ci->me->def->body.alias.original_me;
ci->defined_class = find_defiend_class_by_owner(ci->defined_class, ci->me->klass /* owner */);
ci->defined_class = find_defined_class_by_owner(ci->defined_class, ci->me->klass /* owner */);
goto normal_method_dispatch;
}
case VM_METHOD_TYPE_OPTIMIZED:{