[ruby-cvs:72402] knu:r65302 (trunk): Set the size of a new enumerator created by Enumerator#each with arguments to nil

knu at ruby-lang.org knu at ruby-lang.org
Mon Oct 22 20:23:56 JST 2018


knu	2018-10-22 20:23:56 +0900 (Mon, 22 Oct 2018)

  New Revision: 65302

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

  Log:
    Set the size of a new enumerator created by Enumerator#each with arguments to nil
    
    When each() takes arguments, it is never safe to assume that the iteration
    would repeat the same number of times as with each() without any
    argument.  Actually, there is no way to get the exact number, so the
    size should be set to nil to denote that.

  Modified files:
    trunk/enumerator.c
    trunk/test/ruby/test_enumerator.rb


More information about the ruby-cvs mailing list