diff options
| author | Hiroya Fujinami <make.just.on@gmail.com> | 2023-10-25 16:32:25 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-25 16:32:25 +0900 |
| commit | 3e64cf60b5162bb5dad772f300b7f6346e5f83f9 (patch) | |
| tree | cb59d29a745028a5c55f108d665cb93c6585a4ff /lib | |
| parent | a6a67b0524ec3f8da96143cdf5094b5eaf7d820d (diff) | |
Fix [Bug #19632]: Disable external iterator for frozen enumerator (#7791)
* Fix [Bug #19632]: Disable external iterator for frozen enumerator
Currently, methods to manipulate an external iterator like `#next`
and `#feed` can be called even if a receiver of an enumerator is
frozen. However, these methods change the state of an external
iterator in an enumerator. Therefore, it seems a BUG to me, and
these methods should raise FrozenError if the receiver is frozen.
This fixed the following methods to raise FrozenError if the receiver is
frozen.
- `Enumerator#next`
- `Enumerator#next_values`
- `Enumerator#peek`
- `Enumerator#peek_values`
- `Enumerator#feed`
- `Enumerator#rewind`
* Fix a typo in the document
Thanks @Maumagnaguagno.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions
