mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
Assign temporary ID to anonymous ID [Bug #18250]
Dumped iseq binary can not have unnamed symbols/IDs, and ID 0 is stored instead. As `struct rb_id_table` disallows ID 0, also for the distinction, re-assign a new temporary ID based on the local variable table index when loading from the binary, as well as the parser.
This commit is contained in:
parent
eb301d8aec
commit
c14f230b26
Notes:
git
2021-11-23 21:03:49 +09:00
4 changed files with 14 additions and 4 deletions
|
@ -11554,6 +11554,7 @@ ibf_load_outer_variables(const struct ibf_load * load, ibf_offset_t outer_variab
|
|||
for (size_t i = 0; i < table_size; i++) {
|
||||
ID key = ibf_load_id(load, (ID)ibf_load_small_value(load, &reading_pos));
|
||||
VALUE value = ibf_load_small_value(load, &reading_pos);
|
||||
if (!key) key = rb_make_temporary_id(i);
|
||||
rb_id_table_insert(tbl, key, value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue