Project

General

Profile

Actions

Misc #11584

closed

Kernel::loop silently catching StopIteration, should be documented

Added by rovf (Ronald Fischer) over 8 years ago. Updated over 8 years ago.

Status:
Closed
Assignee:
-
[ruby-core:<unknown>]

Description

The method Kernel::loop implicitly catches a StopIteration exception. This fact is documented on the documentation page for StopIteration, but it should also (and more importantly) be documented with the Kernel::loop method, because if one doesn't know this detail, the behaviour can be pretty surprising - see for example http://stackoverflow.com/questions/33040260/combining-raise-and-throw/.

Actions

Also available in: Atom PDF

Like0
Like0