Skip to content
  • Hiroya Fujinami's avatar
    3e64cf60
    Fix [Bug #19632]: Disable external iterator for frozen enumerator (#7791) · 3e64cf60
    Hiroya Fujinami authored
    * 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.
    3e64cf60
    Fix [Bug #19632]: Disable external iterator for frozen enumerator (#7791)
    Hiroya Fujinami authored
    * 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.
Loading