From 72691e8521cff20414a6ae3f9e3358c12284688e Mon Sep 17 00:00:00 2001 From: tobinibot Date: Wed, 5 Mar 2014 11:09:20 -0500 Subject: [PATCH] Freeze a few more string constants Added .freeze to CODE_NAME, ERROR_400_RESPONSE, and ERROR_500_RESPONSE, I didn't see a reason why they weren't frozen --- lib/puma/const.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/puma/const.rb b/lib/puma/const.rb index 911d912b..3b2656b4 100644 --- a/lib/puma/const.rb +++ b/lib/puma/const.rb @@ -29,7 +29,7 @@ module Puma module Const PUMA_VERSION = VERSION = "2.8.0".freeze - CODE_NAME = "Sir Edmund Percival Hillary" + CODE_NAME = "Sir Edmund Percival Hillary".freeze FAST_TRACK_KA_TIMEOUT = 0.2 @@ -58,7 +58,7 @@ module Puma PUMA_TMP_BASE = "puma".freeze # Indicate that we couldn't parse the request - ERROR_400_RESPONSE = "HTTP/1.1 400 Bad Request\r\n\r\n" + ERROR_400_RESPONSE = "HTTP/1.1 400 Bad Request\r\n\r\n".freeze # The standard empty 404 response for bad requests. Use Error4040Handler for custom stuff. ERROR_404_RESPONSE = "HTTP/1.1 404 Not Found\r\nConnection: close\r\nServer: Puma #{PUMA_VERSION}\r\n\r\nNOT FOUND".freeze @@ -69,7 +69,7 @@ module Puma CONTENT_LENGTH = "CONTENT_LENGTH".freeze # Indicate that there was an internal error, obviously. - ERROR_500_RESPONSE = "HTTP/1.1 500 Internal Server Error\r\n\r\n" + ERROR_500_RESPONSE = "HTTP/1.1 500 Internal Server Error\r\n\r\n".freeze # A common header for indicating the server is too busy. Not used yet. ERROR_503_RESPONSE = "HTTP/1.1 503 Service Unavailable\r\n\r\nBUSY".freeze