summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2025-06-07 20:59:04 -0700
committerJohn Hawthorn <john@hawthorn.email>2025-06-24 20:02:30 -0700
commit443ed45a4e6434e6b09a05e6d2f9c89b20aa384c (patch)
tree140c7e2e77e1f7b896292988c02b203729b27dd6 /class.c
parent7c3bbfcddb05b0eb7cca7ac32efd2fc07e1af6ec (diff)
Refactor rewrite_cref
Diffstat (limited to 'class.c')
-rw-r--r--class.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/class.c b/class.c
index 6e57b3bb5f..96e9aaed21 100644
--- a/class.c
+++ b/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 {