Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,6 @@ hash_ar_foreach_iter(st_data_t key, st_data_t value, st_data_t argp, int error)
if (error) return ST_STOP;

int status = (*arg->func)((VALUE)key, (VALUE)value, arg->arg);
/* TODO: rehash check? rb_raise(rb_eRuntimeError, "rehash occurred during iteration"); */

return hash_iter_status_check(status);
}
Expand All @@ -1313,13 +1312,8 @@ hash_foreach_iter(st_data_t key, st_data_t value, st_data_t argp, int error)

if (error) return ST_STOP;

st_table *tbl = RHASH_ST_TABLE(arg->hash);
int status = (*arg->func)((VALUE)key, (VALUE)value, arg->arg);

if (RHASH_ST_TABLE(arg->hash) != tbl) {
rb_raise(rb_eRuntimeError, "rehash occurred during iteration");
}

return hash_iter_status_check(status);
}

Expand Down