Skip to content

Commit 71b4693

Browse files
committed
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.
1 parent ebb775b commit 71b4693

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

symbol.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ typedef struct {
9999
VALUE ids;
100100
} rb_symbols_t;
101101

102-
rb_symbols_t ruby_global_symbols = {tNEXT_ID-1};
102+
rb_symbols_t ruby_global_symbols = {
103+
.next_id = tNEXT_ID,
104+
};
103105

104106
struct sym_set_static_sym_entry {
105107
VALUE sym;

0 commit comments

Comments
 (0)