From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id BB92C1F5B6 for ; Fri, 28 Dec 2018 19:43:40 +0000 (UTC) From: Eric Wong To: yahns-public@yhbt.net Subject: [PATCH] extras/exec_cgi: remove unecessary .freeze calls Date: Fri, 28 Dec 2018 19:43:40 +0000 Message-Id: <20181228194340.31914-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Operations via Array#map are NOT optimized away by opt_str_lit in the VM, and they're unnecessary anyways with the "frozen_string_literal: true" comment in Ruby 2.3+. --- extras/exec_cgi.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extras/exec_cgi.rb b/extras/exec_cgi.rb index 2746c09..8a1939d 100644 --- a/extras/exec_cgi.rb +++ b/extras/exec_cgi.rb @@ -82,7 +82,7 @@ def close SERVER_PROTOCOL SERVER_SOFTWARE SCRIPT_NAME - ).map(&:freeze) # frozen strings are faster for Hash assignments + ) def initialize(*args) @env = Hash === args[0] ? args.shift : {} -- EW