diff options
author | Eric Wong <e@80x24.org> | 2017-02-13 17:31:29 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-02-13 20:59:03 +0000 |
commit | e06b699683738f22fcbec1a4ad42d1a4095ec396 (patch) | |
tree | 06ce2b0466ae02233dcbed1ba87bb4be8e77d02f | |
parent | 69fd4f9bbff3708166fbf70163fa6e192dde1497 (diff) | |
download | unicorn-e06b699683738f22fcbec1a4ad42d1a4095ec396.tar.gz |
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
-rw-r--r-- | lib/unicorn/http_request.rb | 5 |
1 files changed, 1 insertions, 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 |