From 6f31dd495cb0eb8fd69e4a15885de28cb2dab2e8 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 1 Mar 2024 13:38:49 -0500 Subject: Don't check_rvalue_consistency in is_markable_object is_markable_object is called by rb_objspace_markable_object_p, which may pass a T_NONE object. check_rvalue_consistency will fail if a T_NONE object is passed in. --- gc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index cde2c1b9bc..a680bd8ed3 100644 --- a/gc.c +++ b/gc.c @@ -4415,9 +4415,7 @@ is_live_object(rb_objspace_t *objspace, VALUE ptr) static inline int is_markable_object(VALUE obj) { - if (RB_SPECIAL_CONST_P(obj)) return FALSE; /* special const is not markable */ - check_rvalue_consistency(obj); - return TRUE; + return !RB_SPECIAL_CONST_P(obj); } int -- cgit v1.2.3