mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Support ID_TABLE_STOP for replace function
Iteration should top if the replace function returns ID_TABLE_STOP.
This commit is contained in:
parent
82f0580aa4
commit
142d5db112
Notes:
git
2022-01-26 06:51:37 +09:00
1 changed files with 2 additions and 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)
|
||||
|
||||
if (ret == ID_TABLE_STOP)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue