From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: * X-Spam-ASN: AS6939 216.218.128.0/17 X-Spam-Status: No, score=1.2 required=3.0 tests=AWL,BAYES_00,RCVD_IN_MSPIKE_BL, RCVD_IN_MSPIKE_ZBI,RCVD_IN_XBL,RDNS_NONE,SPF_FAIL,SPF_HELO_FAIL shortcircuit=no autolearn=no autolearn_force=no version=3.4.0 Received: from 80x24.org (unknown [216.218.222.14]) by dcvr.yhbt.net (Postfix) with ESMTP id 1CDFF1F434 for ; Thu, 21 Dec 2017 11:55:27 +0000 (UTC) From: Eric Wong To: spew@80x24.org Subject: [PATCH 4/6] webrick: WEBrick::Log requires path arg when given string Date: Thu, 21 Dec 2017 11:55:05 +0000 Message-Id: <20171221115507.27500-5-e@80x24.org> In-Reply-To: <20171221115507.27500-1-e@80x24.org> References: <20171221115507.27500-1-e@80x24.org> List-Id: 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 --- lib/webrick/log.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/webrick/log.rb b/lib/webrick/log.rb index 41e907cd3b..2c1fdfe602 100644 --- a/lib/webrick/log.rb +++ b/lib/webrick/log.rb @@ -51,7 +51,7 @@ def initialize(log_file=nil, level=nil) @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 -- EW