[前][次][番号順一覧][スレッド一覧]

ruby-changes:29472

From: nobu <ko1@a...>
Date: Fri, 21 Jun 2013 15:15:43 +0900 (JST)
Subject: [ruby-changes:29472] nobu:r41524 (trunk): test_filehandler.rb: reap zombie

nobu	2013-06-21 15:15:34 +0900 (Fri, 21 Jun 2013)

  New Revision: 41524

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41524

  Log:
    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.

  Modified files:
    trunk/test/webrick/test_filehandler.rb

Index: test/webrick/test_filehandler.rb
===================================================================
--- test/webrick/test_filehandler.rb	(revision 41523)
+++ test/webrick/test_filehandler.rb	(revision 41524)
@@ -219,7 +219,7 @@ class WEBrick::TestFileHandler < Test::U https://github.com/ruby/ruby/blob/trunk/test/webrick/test_filehandler.rb#L219
       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"

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]