diff options
author | Adam Hess <[email protected]> | 2023-09-20 09:26:31 -0700 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2023-09-22 09:44:58 -0400 |
commit | 8b236e0c66da8f92e9fc33de66cfbc8e4b0c0763 () | |
tree | 8154d0859136c1a4e5fa51a4267f448f3c1fab32 /vm_insnhelper.c | |
parent | f59b488b5a7f6e46e3e6d80d2b0a269e7d937a30 (diff) |
[Bug #19896]
fix memory in vm_method This introduces a unified reference_count to clarify who is referencing a method. This also allows us to treat the refinement method as the def owner since it counts itself as a reference Co-authored-by: Peter Zhu <[email protected]>
-rw-r--r-- | vm_insnhelper.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3811,7 +3811,7 @@ aliased_callable_method_entry(const rb_callable_method_entry_t *me) VM_ASSERT(RB_TYPE_P(orig_me->owner, T_MODULE)); cme = rb_method_entry_complement_defined_class(orig_me, me->called_id, defined_class); - if (me->def->alias_count + me->def->complemented_count == 0) { RB_OBJ_WRITE(me, &me->def->body.alias.original_me, cme); } else { |