Project

General

Profile

« Previous | Next » 

Revision 3e64cf60

Added by make_now_just (Hiroya Fujinami) over 1 year ago

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.