diff options
author | Peter Zhu <[email protected]> | 2022-01-25 16:16:37 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2022-01-25 16:51:16 -0500 |
commit | 142d5db1122cf28f1a5563c421f169923a9f2e79 () | |
tree | 065562911b75d544dd92e34aef3d139d0bf6f38e /id_table.c | |
parent | 82f0580aa4a1a2da6ab3803dfb4f5e5a58820d3d (diff) |
Support ID_TABLE_STOP for replace function
Iteration should top if the replace function returns ID_TABLE_STOP.
Notes: Merged: https://.com/ruby/ruby/pull/5486
-rw-r--r-- | id_table.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -317,7 +317,8 @@ rb_id_table_foreach_values_with_replace(struct rb_id_table *tbl, rb_id_table_for ret = (*replace)(&val, data, TRUE); tbl->items[i].val = val; } - else if (ret == ID_TABLE_STOP) return; } } |