diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_gc.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index f04e7e0255..381fcd4d18 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -112,4 +112,18 @@ class TestGc < Test::Unit::TestCase ObjectSpace.define_finalizer(Thread.main) { p 'finalize' } EOS end + + def test_sweep_in_finalizer + bug9205 = '[ruby-core:58833] [Bug #9205]' + 2.times do + assert_ruby_status([], <<-'end;', bug9205) + raise_proc = proc do |id| + GC.start + end + 1000.times do + ObjectSpace.define_finalizer(Object.new, raise_proc) + end + end; + end + end end |