diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-14 08:20:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-14 08:20:43 +0000 |
commit | 62fd58480c95af5a58b68d002e52a4ac15788f97 (patch) | |
tree | 3bab297ddd904851cdf0f3c9b3b53f3c94eacf49 /test/ruby | |
parent | 071f564fe547eaafe672ba0baa7036540919fc0d (diff) | |
download | ruby-62fd58480c95af5a58b68d002e52a4ac15788f97.tar.gz |
file.c: open without gvl
* 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/trunk@50887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_require.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index b7797f0877..d840196e51 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 |