diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-16 06:54:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-16 06:54:38 +0000 |
commit | 53e2aa5e3dcaad7d6b55f3c8cb43a7935b036fa4 (patch) | |
tree | af6cb33b4cea4c9cbfae9bbd3149f115103d4b0e /test | |
parent | 8008992e404a90c469cebca8f42fed59618944a7 (diff) | |
download | ruby-53e2aa5e3dcaad7d6b55f3c8cb43a7935b036fa4.tar.gz |
file.c: non-blocking open
* file.c (rb_file_load_ok): open in non-blocking mode withoout
releasing GVL. don't care about others than regular files and
directories. [ruby-dev:49272] [Bug #11559]
* ruby.c (load_file_internal): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_require.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_require.rb b/test/ruby/test_require.rb index 25116e4912..d51aeb2ae7 100644 --- a/test/ruby/test_require.rb +++ b/test/ruby/test_require.rb @@ -702,7 +702,12 @@ class TestRequire < Test::Unit::TestCase 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])} + assert_nothing_raised do + begin + load(ARGV[0]) + rescue IOError + end + end END } end unless /mswin|mingw/ =~ RUBY_PLATFORM |