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 | 0b3ef899f200f4a54433d53f92fbf81f619c67d7 (patch) | |
tree | 3bab297ddd904851cdf0f3c9b3b53f3c94eacf49 /test/ruby | |
parent | 9b04c1dd420743539c76e3b3826301f78fbbaede (diff) | |
download | ruby-0b3ef899f200f4a54433d53f92fbf81f619c67d7.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 |