[ruby-cvs:64287] rhe:r57121 (trunk): array.c: do not resize to less than 0

rhe at ruby-lang.org rhe at ruby-lang.org
Tue Dec 20 15:53:44 JST 2016


rhe	2016-12-20 15:53:44 +0900 (Tue, 20 Dec 2016)

  New Revision: 57121

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

  Log:
    array.c: do not resize to less than 0
    
    Shrinking the Array from the block invoked by Array#select! or
    Array#reject! causes the Array to be a negative number size. Ensure that
    the resulting Array won't be smaller than 0.
    [ruby-core:78739] [Bug #13053]

  Modified files:
    trunk/array.c
    trunk/test/ruby/test_array.rb


More information about the ruby-cvs mailing list