Actions
Bug #11961
closedArray#delete_if gets an unexpected behavior when Array is modified during execution
Description
However strange is the code below the behavior is not which expected.
a = %w(aue)
a.delete_if { a.delete_if { true }; true}
p a
with ruby 2.3 it produces:
["aue", false, false]
with ruby 2.2 it procudes:
[]
After a git bisect I found 5ec029d1ea52224a365a11987379c3e9de74b47a (r49255) commit for feature #10714 as possible culprit.
Updated by elionne (Stéphane Clérambault) over 8 years ago
- Subject changed from Array#delete_if get an expected behavior when Array in modified during treatment to Array#delete_if gets an unexpected behavior when Array is modified during execution
Updated by jeremyevans0 (Jeremy Evans) over 4 years ago
- Status changed from Open to Closed
Actions
Like0
Like0Like0