diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-27 14:06:16 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-27 14:06:16 +0000 |
commit | e59b9d35fcd58331928aa1f62fe48287b0c643e2 (patch) | |
tree | e324012271616d7cf18c00d7f66caa7ccb2d8943 /bootstraptest/test_thread.rb | |
parent | e02f7f79c23aaaf7c5878408a2b46b00f23c32ba (diff) |
* insns.def (onceinlinecache): add exclusion control for a region
between onceinlinecache and setinlinecache. [ruby-dev:39768]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_thread.rb')
-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 +} |