Actions
Bug #13053
closedArray#select! can resize to negative size
Bug #13053:
Array#select! can resize to negative size
Description
Since Ruby 2.3 ([Feature #10714]), the following code cause the Array to be nagative number size.
ary = [1,2,3,4,5]
ary.select! { |i| ary.clear if i==5; false }
p ary #=> []
p ary.size #=> -5
Actions