You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
End result ok - array elements were deleted, but size was not updated during delete_if iterations and it should be.
If I run this in ruby-1.9.3-p484 [ x86_64 ]:
4
4
3
3
=> [1, 3]
The text was updated successfully, but these errors were encountered:
jruby-1.7.6 [ x86_64 ](using rvm)
a=[1,2,3,4]
a.delete_if { |e| puts a.size; e % 2 == 0 }
4
4
4
4
=> [1, 3]
End result ok - array elements were deleted, but size was not updated during delete_if iterations and it should be.
If I run this in ruby-1.9.3-p484 [ x86_64 ]:
4
4
3
3
=> [1, 3]
The text was updated successfully, but these errors were encountered: