summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2024-03-01 13:38:49 -0500
committerPeter Zhu <peter@peterzhu.ca>2024-03-01 13:38:49 -0500
commit6f31dd495cb0eb8fd69e4a15885de28cb2dab2e8 (patch)
tree5296f960e989b18f602aa462d3ef46e3c285401b
parent661f9e6d03d04667b5488ec202c0e1ec6f97c080 (diff)
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.
-rw-r--r--gc.c4
1 files changed, 1 insertions, 3 deletions
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