summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-16 06:54:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-16 06:54:38 +0000
commitabf832f4357b02ab40a1bbcb6e59bbc1c35d2817 (patch)
treeaf6cb33b4cea4c9cbfae9bbd3149f115103d4b0e /test
parent6291c6ad77a0587d3d7d5461d969f1bc9bbe866d (diff)
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.rb7
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