about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-01-07 11:55:12 -0800
committerEric Wong <normalperson@yhbt.net>2011-01-07 11:57:17 -0800
commitfbedef35186609f9e1cdedaa3a9d2a016423fe82 (patch)
treeb2d45fb0d79ef7ff96a791f653f8521d83fb150a
parentefbdc44a5a301e5ea16d5135afaa9cda3a33f5d3 (diff)
downloadrainbows-fbedef35186609f9e1cdedaa3a9d2a016423fe82.tar.gz
I realize this lock overly covers different versions of
Ruby, but it's simple and we don't need to invoke isolate
too often (we hope).
-rw-r--r--t/test_isolate.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/test_isolate.rb b/t/test_isolate.rb
index a97417c..c8a88fa 100644
--- a/t/test_isolate.rb
+++ b/t/test_isolate.rb
@@ -13,6 +13,8 @@ opts = {
 old_out = $stdout.dup
 $stdout.reopen($stderr)
 
+lock = File.open(__FILE__, "rb")
+lock.flock(File::LOCK_EX)
 Isolate.now!(opts) do
   gem 'rack', '1.2.1'
   gem 'kgio', '2.1.1'