diff options
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_thread.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bootstraptest/test_thread.rb b/bootstraptest/test_thread.rb index 56c77259cf..2494cccbf3 100644 --- a/bootstraptest/test_thread.rb +++ b/bootstraptest/test_thread.rb @@ -443,3 +443,12 @@ assert_equal 'ok', %q{ 'ok' end } + +assert_equal 'foo', %q{ + f = proc {|s| /#{ sleep 1; s }/o } + [ Thread.new { f.call("foo"); nil }, + Thread.new { sleep 0.5; f.call("bar"); nil }, + ].each {|t| t.join } + GC.start + f.call.source +} |