Skip to content

Commit

Permalink
Simplify is_live_object
Browse files Browse the repository at this point in the history
  • Loading branch information
peterzhu2118 committed Feb 27, 2024
1 parent 5efe386 commit 9ba53cb
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions gc.c
Expand Up @@ -4406,12 +4406,7 @@ is_live_object(rb_objspace_t *objspace, VALUE ptr)
break;
}

if (!is_garbage_object(objspace, ptr)) {
return TRUE;
}
else {
return FALSE;
}
return !is_garbage_object(objspace, ptr);
}

static inline int
Expand Down

0 comments on commit 9ba53cb

Please sign in to comment.