From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: yahns-public@yhbt.net Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id DB0B6203FA for ; Tue, 13 Oct 2015 21:20:26 +0000 (UTC) From: Eric Wong To: yahns-public@yhbt.net Subject: [PATCH] proxy_http_response: use frozen string literal optimization Date: Tue, 13 Oct 2015 21:20:29 +0000 Message-Id: <20151013212029.3625-1-e@80x24.org> List-Id: This can reduce the amount of garbage we have by a small amount. Once Ruby 2.3 comes out, we can rely on the "frozen_string_literal: true" directive --- lib/yahns/proxy_http_response.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/yahns/proxy_http_response.rb b/lib/yahns/proxy_http_response.rb index 50c841d..3858456 100644 --- a/lib/yahns/proxy_http_response.rb +++ b/lib/yahns/proxy_http_response.rb @@ -91,8 +91,8 @@ def proxy_response_start(res, tip, kcar, req_res) # For now, do not add a Date: header, assume upstream already did it # but do not care if they did not - res << (alive ? "Connection: keep-alive\r\n\r\n" - : "Connection: close\r\n\r\n") + res << (alive ? "Connection: keep-alive\r\n\r\n".freeze + : "Connection: close\r\n\r\n".freeze) # send the headers case rv = kgio_syssend(res, flags) -- EW