1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_filehandler.rb: reap zombie

* test/webrick/test_filehandler.rb (test_short_filename): use backtick
  to reap zombie, instead of leaving opened stream after reading.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-06-21 06:15:34 +00:00
parent ac9413893a
commit afc75f2284

View file

@ -219,7 +219,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
if windows?
fname = nil
Dir.chdir(config[:DocumentRoot]) do
fname = IO.popen("dir /x webrick_long_filename.cgi", "r").read.match(/\s(w.+?cgi)\s/i)[1].downcase
fname = `dir /x webrick_long_filename.cgi`.match(/\s(w.+?cgi)\s/i)[1].downcase
end
else
fname = "webric~1.cgi"