diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_gc.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 9d68c1a9c0..11d2b4c596 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -134,4 +134,10 @@ class TestGc < Test::Unit::TestCase ensure GC::Profiler.disable end + + def test_finalizing_main_thread + assert_in_out_err(%w[--disable-gems], <<-EOS, ["\"finalize\""], [], "[ruby-dev:46647]") + ObjectSpace.define_finalizer(Thread.main) { p 'finalize' } + EOS + end end |