[ruby-cvs:59369] knu:r52218 (trunk): Kernel#loop returns the result value of a finished iterator

knu at ruby-lang.org knu at ruby-lang.org
Thu Oct 22 18:58:02 JST 2015


knu	2015-10-22 18:58:01 +0900 (Thu, 22 Oct 2015)

  New Revision: 52218

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52218

  Log:
    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]

  Modified files:
    trunk/ChangeLog
    trunk/NEWS
    trunk/test/ruby/test_enumerator.rb
    trunk/vm_eval.c


More information about the ruby-cvs mailing list