diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-11-23 00:09:41 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-11-23 21:03:19 +0900 |
commit | c14f230b26aa4f8abe9ecf3814cfebbe584d77c9 (patch) | |
tree | b4d605d19bc2db444a24d41251e7d204bf3a0d30 /internal/symbol.h | |
parent | eb301d8aecf454681e78cd7ad6d027e67b121857 (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5157
Diffstat (limited to 'internal/symbol.h')
-rw-r--r-- | internal/symbol.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/symbol.h b/internal/symbol.h index 6875d98db3..4f041330f9 100644 --- a/internal/symbol.h +++ b/internal/symbol.h @@ -28,6 +28,7 @@ int rb_is_local_name(VALUE name); PUREFUNC(int rb_is_const_sym(VALUE sym)); PUREFUNC(int rb_is_attrset_sym(VALUE sym)); ID rb_make_internal_id(void); +ID rb_make_temporary_id(size_t n); void rb_gc_free_dsymbol(VALUE); #if __has_builtin(__builtin_constant_p) |