summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2025-09-21 11:33:23 -0400
committerPeter Zhu <peter@peterzhu.ca>2025-09-21 13:12:34 -0400
commit4a082b5d347951ad7d2007d6726f3cfe5232a382 (patch)
treee7ae73ff4dc614d533ce8015464c1b88e5134eb9
parent02299d68bcb0e6eabab2b973b28e9dafbafe6149 (diff)
Fix assertion in rb_gc_impl_mark_weak
The FL_WB_PROTECTED flag is no longer used and is not set on objects, so that assertion cannot be true. Instead, we should use RVALUE_WB_UNPROTECTED.
-rw-r--r--gc/default/default.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gc/default/default.c b/gc/default/default.c
index b7d3714973..423d27dde1 100644
--- a/gc/default/default.c
+++ b/gc/default/default.c
@@ -4505,7 +4505,7 @@ rb_gc_impl_mark_weak(void *objspace_ptr, VALUE *ptr)
{
rb_objspace_t *objspace = objspace_ptr;
- GC_ASSERT(objspace->rgengc.parent_object == 0 || FL_TEST(objspace->rgengc.parent_object, FL_WB_PROTECTED));
+ GC_ASSERT(objspace->rgengc.parent_object == 0 || !RVALUE_WB_UNPROTECTED(objspace, objspace->rgengc.parent_object));
VALUE obj = *ptr;