This ensures we won't have duplicate objects in Ruby 2.0-2.4.
For Ruby 2.5.0dev+, this avoids any duplicate cleanup
introduced as of r57471: https://bugs.ruby-lang.org/issues/13085
---
lib/unicorn/http_request.rb | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb
index 0c1f9bb..c176083 100644
--- a/lib/unicorn/http_request.rb
+++ b/lib/unicorn/http_request.rb
@@ -24,10 +24,7 @@ class Unicorn::HttpParser
NULL_IO = StringIO.new("")
# :stopdoc:
- # A frozen format for this is about 15% faster
- # Drop these frozen strings when Ruby 2.2 becomes more prevalent,
- # 2.2+ optimizes hash assignments when used with literal string keys
- HTTP_RESPONSE_START = [ 'HTTP', '/1.1 ']
+ HTTP_RESPONSE_START = [ 'HTTP'.freeze, '/1.1 '.freeze ]
@@input_class = Unicorn::TeeInput
@@check_client_connection = false
--
EW
--
unsubscribe: [email protected]
archive: https://bogomips.org/unicorn-public/