Project

General

Profile

Actions

Bug #9814

closed

Improving documentation example for Enumerator#peek

Added by futureperfect (Erik Hollembeak) almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Assignee:
Target version:
ruby -v:
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]
[ruby-core:62462]

Description

The existing example for Enumerator#peek doesn't effectively document the behavior when peeking after an enumerator has been entirely consumed. Rather, it documents the behavior of Enumerator#next.

This change more effectively demonstrates that StopIteration is raised when peeking beyond the end of the enumerator.


Files

0001-Improving-example-for-Enumerator-peek.patch (861 Bytes) 0001-Improving-example-for-Enumerator-peek.patch futureperfect (Erik Hollembeak), 05/08/2014 08:03 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0