Actions
Bug #13052
closedArray#combination segfaults if the Array is modified during iteration
Bug #13052:
Array#combination segfaults if the Array is modified during iteration
Description
Array#combination and Array#repeated_combination segfault if the Array is modified from the invoked block.
Reproduce:
ary = *1..100
ary.combination(1) { |x| p x; ary.clear } #=> segfault
# or ary.repeated_combination(1) { |x| p x; ary.clear } #=> segfault
This is the same as [Bug #9939], but it didn't fix the case of the argument is 1.
Actions