From abf832f4357b02ab40a1bbcb6e59bbc1c35d2817 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 16 Oct 2015 06:54:38 +0000 Subject: 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 --- test/ruby/test_require.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/ruby/test_require.rb') 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 -- cgit v1.2.3