Handle mutating of array passed to Set.new during iteration
commit21035c826db5933cf836a4a12fb74b696a76b255
authorJeremy Evans <[email protected]>
Sat, 3 May 2025 18:20:23 +0000 (3 11:20 -0700)
committerJeremy Evans <[email protected]>
Sat, 3 May 2025 19:10:57 +0000 (4 04:10 +0900)
treeca8261eab1c1330b466e0895808de3608342b281
parentbe665cf855d7b35ce166ea1137d4f8d0cac1010b
Handle mutating of array passed to Set.new during iteration

This avoids a heap-use-after-free.

Fixes [Bug #21306]
set.c
test/ruby/test_set.rb