diff --git a/gc.c b/gc.c index 1bb78add2a..f90bdd99bf 100644 --- a/gc.c +++ b/gc.c @@ -4982,8 +4982,8 @@ gc_mark_children(rb_objspace_t *objspace, VALUE obj) case T_CLASS: case T_MODULE: mark_m_tbl(objspace, RCLASS_M_TBL(obj)); - if (RCLASS_SUPER((VALUE)obj)) { - gc_mark(objspace, RCLASS_SUPER((VALUE)obj)); + if (RCLASS_SUPER(obj)) { + gc_mark(objspace, RCLASS_SUPER(obj)); } if (!RCLASS_EXT(obj)) break; mark_tbl_no_pin(objspace, RCLASS_IV_TBL(obj)); @@ -4994,8 +4994,8 @@ gc_mark_children(rb_objspace_t *objspace, VALUE obj) if (FL_TEST(obj, RICLASS_IS_ORIGIN)) { mark_m_tbl(objspace, RCLASS_M_TBL(obj)); } - if (RCLASS_SUPER((VALUE)obj)) { - gc_mark(objspace, RCLASS_SUPER((VALUE)obj)); + if (RCLASS_SUPER(obj)) { + gc_mark(objspace, RCLASS_SUPER(obj)); } if (!RCLASS_EXT(obj)) break; mark_m_tbl(objspace, RCLASS_CALLABLE_M_TBL(obj));