From 71b46938a7dd61304f012025e06891e8fe2e37fb Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 5 Aug 2025 15:53:02 -0400 Subject: [PATCH] Fix off-by-one in symbol next_id Symbol last_id was changed to next_id, but it remained to be set to tNEXT_ID - 1 initially, causing the initial static symbol to overlap with the last built-in symbol in id.def. --- symbol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/symbol.c b/symbol.c index abb2c76dc2..c337cc288e 100644 --- a/symbol.c +++ b/symbol.c @@ -99,7 +99,9 @@ typedef struct { VALUE ids; } rb_symbols_t; -rb_symbols_t ruby_global_symbols = {tNEXT_ID-1}; +rb_symbols_t ruby_global_symbols = { + .next_id = tNEXT_ID, +}; struct sym_set_static_sym_entry { VALUE sym;