From 209e2f277e5d528a8bbbccbb5fac6ca087ed2335 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 16 Apr 2024 14:06:36 -0400 Subject: [PATCH] Don't allow T_NIL in gc_is_moveable_obj gc_is_moveable_obj is only given GC managed objects, and T_NIL cannot be a GC managed type. --- gc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gc.c b/gc.c index 1f5d0fe365..044ce2c984 100644 --- a/gc.c +++ b/gc.c @@ -9511,7 +9511,6 @@ gc_is_moveable_obj(rb_objspace_t *objspace, VALUE obj) switch (BUILTIN_TYPE(obj)) { case T_NONE: - case T_NIL: case T_MOVED: case T_ZOMBIE: return FALSE;