From 50d39219a9b5f19a536c02ec47b54b79efa015f5 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 19 Dec 2023 15:21:28 -0500 Subject: [PATCH] Use RICLASS_OWNS_M_TBL_P It's more consistent with gc_mark_children. --- gc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gc.c b/gc.c index ff6c8a64d1..b07a6a6e16 100644 --- a/gc.c +++ b/gc.c @@ -10752,8 +10752,7 @@ gc_update_object_references(rb_objspace_t *objspace, VALUE obj) break; case T_ICLASS: - if (FL_TEST(obj, RICLASS_IS_ORIGIN) && - !FL_TEST(obj, RICLASS_ORIGIN_SHARED_MTBL)) { + if (RICLASS_OWNS_M_TBL_P(obj)) { update_m_tbl(objspace, RCLASS_M_TBL(obj)); } if (RCLASS_SUPER((VALUE)obj)) {