[ruby-core:71292] [Ruby trunk - Misc #11584] [Closed] Kernel::loop silently catching StopIteration, should be documented

From: nagachika00@...
Date: 2015-11-02 01:57:51 UTC
List: ruby-core #71292
Issue #11584 has been updated by Tomoyuki Chikanaga.

Status changed from Open to Closed

r52218 added documentation about Kernel#loop and StopIteration.

----------------------------------------
Misc #11584: Kernel::loop silently catching StopIteration, should be documented 
https://bugs.ruby-lang.org/issues/11584#change-54667

* Author: Ronald Fischer
* Status: Closed
* Priority: Normal
* Assignee: 
----------------------------------------
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/. 



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

In This Thread

Prev Next