diff --git a/gc.c b/gc.c index 10bce22639fc65..755863755534da 100644 --- a/gc.c +++ b/gc.c @@ -2507,6 +2507,9 @@ count_objects(int argc, VALUE *argv, VALUE os) } for (size_t i = 0; i <= T_MASK; i++) { + // type_sym can allocate an object, + // so we need to create all key symbols in advance + // not to disturb the result types[i] = type_sym(i); }
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: