Remove redundant check in rgengc_check_relation

WB-unprotected objects are always young. This invariant is maintained throughout the code base.
When WB-unprotecting an object, the object gets de-aged.
This commit is contained in:
Luke Gruber authored and Luke Gruber committed 2026-10-01 17:59:23 -04:00
1 parent bac5fe3735
commit a320eeff00
1 file changed
+1 -1
Notes: git 2026-10-01 21:59:54 +00:00
+1 -1
View File
@@ -6234,7 +6234,7 @@ static void
rgengc_check_relation(rb_objspace_t *objspace, VALUE obj)
{
if (objspace->rgengc.parent_object_old_p) {
if (RVALUE_WB_UNPROTECTED(objspace, obj) || !RVALUE_OLD_P(objspace, obj)) {
if (!RVALUE_OLD_P(objspace, obj)) {
rgengc_remember(objspace, objspace->rgengc.parent_object);
/* It is in the rememberset now, so its remaining children have nothing left
* to ask for: stop testing them. */