From a3d4db346a5c49ce645fb55054ecb571e585f72a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 13 Oct 2015 21:14:50 +0000 Subject: proxy_http_response: use frozen string literal optimization 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(-) (limited to 'lib') 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 @@ module Yahns::HttpResponse # :nodoc: # 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) -- cgit v1.2.3-24-ge0c7