mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Refactor rewrite_cref
This commit is contained in:
parent
7c3bbfcddb
commit
443ed45a4e
3 changed files with 23 additions and 11 deletions
3
class.c
3
class.c
|
@ -877,8 +877,7 @@ static void
|
|||
clone_method(VALUE old_klass, VALUE new_klass, ID mid, const rb_method_entry_t *me)
|
||||
{
|
||||
if (me->def->type == VM_METHOD_TYPE_ISEQ) {
|
||||
rb_cref_t *new_cref;
|
||||
rb_vm_rewrite_cref(me->def->body.iseq.cref, old_klass, new_klass, &new_cref);
|
||||
rb_cref_t *new_cref = rb_vm_rewrite_cref(me->def->body.iseq.cref, old_klass, new_klass);
|
||||
rb_add_method_iseq(new_klass, mid, me->def->body.iseq.iseqptr, new_cref, METHOD_ENTRY_VISI(me));
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue