summaryrefslogtreecommitdiff
path: root/test/ruby/test_require.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_require.rb')
-rw-r--r--test/ruby/test_require.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb
index b7797f0..d840196 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -693,4 +693,17 @@ class TestRequire < Test::Unit::TestCase
INPUT
}
end
+
+ def test_loading_fifo_threading
+ Tempfile.create(%w'fifo .rb') {|f|
+ f.close
+ File.unlink(f.path)
+ File.mkfifo(f.path)
+ assert_separately(["-", f.path], <<-END, timeout: 3)
+ th = Thread.current
+ Thread.start {0.1; th.raise(IOError)}
+ assert_raise(IOError) {load(ARGV[0])}
+ END
+ }
+ end
end