mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
reload AR table body for transient heap.
ar_talbe (Hash representation for <=8 size) can use transient heap and the memory area can move. So we need to restore `pair' ptr after `func` call (which can run any programs) because of moving.
This commit is contained in:
parent
e288632f22
commit
350dafd56a
1 changed files with 1 additions and 0 deletions
1
hash.c
1
hash.c
|
@ -974,6 +974,7 @@ ar_foreach_check(VALUE hash, st_foreach_check_callback_func *func, st_data_t arg
|
|||
|
||||
switch (retval) {
|
||||
case ST_CHECK: {
|
||||
pair = RHASH_AR_TABLE_REF(hash, i);
|
||||
if (pair->key == never) break;
|
||||
ret = ar_find_entry_hint(hash, hint, key);
|
||||
if (ret == RHASH_AR_TABLE_MAX_BOUND) {
|
||||
|
|
Loading…
Add table
Reference in a new issue