From 5dd0e54414f01c4a310ce469b016d53104c543da Mon Sep 17 00:00:00 2001 From: knu Date: Thu, 22 Oct 2015 09:58:01 +0000 Subject: Kernel#loop returns the result value of a finished iterator * vm_eval.c (rb_f_loop): When a loop is stopped by a StopIteration exception, return what the enumerator has returned instead of nil. [ruby-core:71133] [Feature #11498] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 8a2c7f5846..ee347083a6 100644 --- a/NEWS +++ b/NEWS @@ -64,6 +64,11 @@ with all sufficient information, see the ChangeLog file. this parameter is bitwise-ORed to oflags generated by normal mode argument. [Feature #11253] +* Kernel + + * Kernel#loop, when stopped by a StopIteration exception, returns + what the enumerator has returned instead of nil. + * Module * Module#deprecate_constant [Feature #11398] -- cgit v1.2.3