From: e@...
Date: 2014-05-25T03:00:24+00:00
Subject: [ruby-core:62741] [ruby-trunk - Bug #9814] [Closed] Improving documentation example for Enumerator#peek

Issue #9814 has been updated by Zachary Scott.

Status changed from Assigned to Closed
% Done changed from 0 to 100

Applied in changeset r46099.

----------
* enumerator.c: [DOC] Fix example to show Enumerator#peek behavior
  Patch by Erik Hollembeak [Bug #9814] [ci skip]

----------------------------------------
Bug #9814: Improving documentation example for Enumerator#peek
https://bugs.ruby-lang.org/issues/9814#change-46864

* Author: Erik Hollembeak
* Status: Closed
* Priority: Normal
* Assignee: Zachary Scott
* Category: doc
* Target version: current: 2.2.0
* ruby -v: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
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)


-- 
https://bugs.ruby-lang.org/