mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
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.
This commit is contained in:
parent
ebb775be8d
commit
71b46938a7
1 changed files with 3 additions and 1 deletions
4
symbol.c
4
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue