summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-03 08:51:59 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-03 08:51:59 +0000
commitdffe87c72014a4732282126acc87c898fddb0d81 (patch)
tree7be2eb3415f43af35d8c6b27eac291c458fa6eba /test
parentee1519777bbd4f57463e23b267653f8f37d7afaa (diff)
merge revision(s) 50887,50896,50902: [Backport #11060]
* file.c (rb_file_load_ok): try opening file without gvl not to lock entire process. [Bug #11060] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@51118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-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 2bdad8f981..44bcfc6343 100644
--- a/test/ruby/test_require.rb
+++ b/test/ruby/test_require.rb
@@ -687,4 +687,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 {begin sleep(0.001) end until th.stop?; th.raise(IOError)}
+ assert_raise(IOError) {load(ARGV[0])}
+ END
+ }
+ end unless /mswin|mingw/ =~ RUBY_PLATFORM
end