Volodymyr Chernetskyi
9a8966879a
fix(iter): keep take() predicate within bounds #41635
...
Problem:
`IterArray:take()` iterates up to `self._tail`, but `_tail` is
exclusive. When no element fails the predicate, the loop reads one index
past the last element and calls the predicate with `nil`.
Solution:
Stop at `self._tail - inc`, which is the last in-range index for both
iteration directions. Add tests using a predicate which dereferences its
argument and matches every element, forward and reversed.
AI-assisted
2026-09-03 03:23:45 -04:00
..
2026-07-21 13:22:39 +02:00
2026-07-21 13:22:39 +02:00
2026-08-27 16:12:11 -04:00
2026-07-21 13:22:39 +02:00
2026-07-21 13:22:39 +02:00
2026-08-26 07:18:22 -04:00
2026-07-21 13:22:39 +02:00
2026-08-13 09:17:16 -04:00
2026-07-21 13:22:39 +02:00
2026-07-21 13:22:39 +02:00
2026-08-26 07:18:22 -04:00
2026-07-21 13:22:39 +02:00
2026-07-21 13:22:39 +02:00
2026-09-02 07:45:52 -04:00
2026-07-21 13:22:39 +02:00
2026-09-03 03:23:45 -04:00
2026-07-21 13:22:39 +02:00
2026-07-21 13:22:39 +02:00
2026-09-02 10:08:37 -04:00
2026-07-21 13:22:39 +02:00
2026-07-21 13:22:39 +02:00
2026-07-21 13:22:39 +02:00
2026-07-29 12:54:43 -04:00
2026-07-24 13:05:20 +02:00
2026-08-27 06:14:24 -04:00
2026-08-23 07:13:41 -04:00
2026-08-26 07:18:22 -04:00
2026-07-21 13:22:39 +02:00
2026-08-30 08:32:55 -04:00
2026-07-21 13:22:39 +02:00
2026-07-21 13:22:39 +02:00
2026-07-21 08:04:16 -04:00
2026-07-26 06:24:39 -04:00
2026-07-21 13:22:39 +02:00
2026-07-21 13:22:39 +02:00
2026-09-01 15:17:22 +00:00
2026-08-17 11:16:11 +08:00
2026-08-26 07:18:22 -04:00
2026-07-21 13:22:39 +02:00
2026-07-21 13:22:39 +02:00
2026-09-02 10:10:18 -04:00
2026-08-26 07:18:22 -04:00
2026-07-21 13:22:39 +02:00
2026-08-26 07:18:22 -04:00
2026-07-21 13:22:39 +02:00