diff options
Diffstat (limited to 'test/ruby')
| -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 e3186c9a44..ba193cec84 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -160,4 +160,18 @@ class TestGc < Test::Unit::TestCase assert base_length < GC.stat[:heap_length] eom end + + def test_sweep_in_finalizer + bug9205 = '[ruby-core:58833] [Bug #9205]' + 100.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 |
