mirror of
https://github.com/ruby/ruby.git
synced 2026-01-27 04:24:23 +00:00
Error if deleting a nonexistent obj from geniv
I don't think this ever happened, but we should raise the same error we'd raise on lookup
This commit is contained in:
parent
5bef7577b3
commit
a60cd8787c
Notes:
git
2025-11-27 00:14:08 +00:00
@ -1317,7 +1317,9 @@ rb_free_generic_ivar(VALUE obj)
|
||||
ec->gen_fields_cache.fields_obj = Qundef;
|
||||
}
|
||||
RB_VM_LOCKING() {
|
||||
st_delete(generic_fields_tbl_no_ractor_check(), &key, &value);
|
||||
if (!st_delete(generic_fields_tbl_no_ractor_check(), &key, &value)) {
|
||||
rb_bug("Object is missing entry in generic_fields_tbl");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user