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

ruby-changes:49285

From: normal <ko1@a...>
Date: Fri, 22 Dec 2017 10:18:05 +0900 (JST)
Subject: [ruby-changes:49285] normal:r61400 (trunk): webrick: WEBrick::Log requires path arg when given string

normal	2017-12-22 10:07:55 +0900 (Fri, 22 Dec 2017)

  New Revision: 61400

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61400

  Log:
    webrick: WEBrick::Log requires path arg when given string
    
    Allowing a user to specify "| command" via Kernel#open is
    nonsensical since we never read from the resultant IO.
    
    * lib/webrick/log.rb (initialize): replace Kernel#open with File.open
      [Misc #14216]

  Modified files:
    trunk/lib/webrick/log.rb
Index: lib/webrick/log.rb
===================================================================
--- lib/webrick/log.rb	(revision 61399)
+++ lib/webrick/log.rb	(revision 61400)
@@ -51,7 +51,7 @@ module WEBrick https://github.com/ruby/ruby/blob/trunk/lib/webrick/log.rb#L51
       @level = level || INFO
       case log_file
       when String
-        @log = open(log_file, "a+")
+        @log = File.open(log_file, "a+")
         @log.sync = true
         @opened = true
       when NilClass

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

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