do not close FSs explicitly.
* test/ruby/test_dir.rb: r67159 closes all files explicitly but this change breaks attempt of this test introduced at r56467. Try another solution which removes all references from an Array with `#clear`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7ebea69529
commit
2e9d4b9f0b
@ -458,10 +458,10 @@ class TestDir < Test::Unit::TestCase
|
|||||||
Process.setrlimit(Process::RLIMIT_NOFILE, 50)
|
Process.setrlimit(Process::RLIMIT_NOFILE, 50)
|
||||||
begin
|
begin
|
||||||
fs = []
|
fs = []
|
||||||
tap {tap {tap {(0..100).map {fs << open(IO::NULL)}}}}
|
tap {tap {tap {(0..100).each {fs << open(IO::NULL)}}}}
|
||||||
rescue Errno::EMFILE
|
rescue Errno::EMFILE
|
||||||
ensure
|
ensure
|
||||||
fs.each{|f| f.close}
|
fs.clear
|
||||||
end
|
end
|
||||||
list = Dir.glob("*").sort
|
list = Dir.glob("*").sort
|
||||||
assert_not_empty(list)
|
assert_not_empty(list)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user