* [PATCH] proxy_http_response: use frozen string literal optimization
@ 2015-10-13 21:20 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-10-13 21:20 UTC (permalink / raw)
To: yahns-public
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-13 21:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-13 21:20 [PATCH] proxy_http_response: use frozen string literal optimization Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/yahns.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).