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.
This commit is contained in:
Peter Zhu 2024-04-16 14:06:36 -04:00
parent 2470565993
commit 209e2f277e

1
gc.c
View File

@ -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;