diff options
author | Peter Zhu <[email protected]> | 2024-04-05 16:14:35 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2024-04-05 16:15:40 -0400 |
commit | a80e8ba1c4c0fc802acb21279a72fdb78abe9364 (patch) | |
tree | 8176b7383b227c42dd2d3ef4d2e95827639b2ffb /symbol.c | |
parent | 37490474c4bd45572c0bb35506dc6e032c8ebfd2 (diff) |
Assert correct types in set_id_entry
Diffstat (limited to 'symbol.c')
-rw-r--r-- | symbol.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -430,6 +430,9 @@ static void set_id_entry(rb_symbols_t *symbols, rb_id_serial_t num, VALUE str, VALUE sym) { ASSERT_vm_locking(); + RUBY_ASSERT(BUILTIN_TYPE(str) == T_STRING); + RUBY_ASSERT(SYMBOL_P(sym)); + size_t idx = num / ID_ENTRY_UNIT; VALUE ary, ids = symbols->ids; |