summaryrefslogtreecommitdiff
path: root/test/test_tmpdir.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_tmpdir.rb')
-rw-r--r--test/test_tmpdir.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/test_tmpdir.rb b/test/test_tmpdir.rb
index eada416f6f..054ca15d7a 100644
--- a/test/test_tmpdir.rb
+++ b/test/test_tmpdir.rb
@@ -115,4 +115,20 @@ class TestTmpdir < Test::Unit::TestCase
end
end
end
+
+ def test_ractor
+ assert_ractor(<<~'end;', require: "tmpdir")
+ r = Ractor.new do
+ Dir.mktmpdir() do |d|
+ Ractor.yield d
+ Ractor.receive
+ end
+ end
+ dir = r.take
+ assert_file.directory? dir
+ r.send true
+ r.take
+ assert_file.not_exist? dir
+ end;
+ end
end