diff options
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_gc.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index c678c3c6c6..b7de62b195 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -174,4 +174,17 @@ class TestGc < Test::Unit::TestCase end; end end + + def test_exception_in_finalizer + bug9168 = '[ruby-core:58652] [Bug #9168]' + assert_normal_exit(<<-'end;', bug9168) + raise_proc = proc {raise} + 10000.times do + ObjectSpace.define_finalizer(Object.new, raise_proc) + Thread.handle_interrupt(RuntimeError => :immediate) {break} + Thread.handle_interrupt(RuntimeError => :on_blocking) {break} + Thread.handle_interrupt(RuntimeError => :never) {break} + end + end; + end end |
