about summary refs log tree commit homepage
path: root/lib/unicorn/http_response.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-02-13 22:56:36 -0800
committerEric Wong <normalperson@yhbt.net>2009-02-13 22:56:36 -0800
commit92f412c8ead79524da5b823028dda14864f7f8ae (patch)
treecab15a121ec8c27cf31fe9f2cea424cad747bc9a /lib/unicorn/http_response.rb
parent8215e3d17884e6e08d552ae89e067edd331ea05b (diff)
downloadunicorn-92f412c8ead79524da5b823028dda14864f7f8ae.tar.gz
Rack spec specifies #each must be defined, not #each_pair.

Hash#each_pair was marginally faster in Ruby 1.8, but in Ruby
1.9.1, Hash#each and Hash#each_pair are the same function.
Diffstat (limited to 'lib/unicorn/http_response.rb')
-rw-r--r--lib/unicorn/http_response.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/unicorn/http_response.rb b/lib/unicorn/http_response.rb
index 1192d48..e67d2b3 100644
--- a/lib/unicorn/http_response.rb
+++ b/lib/unicorn/http_response.rb
@@ -44,7 +44,7 @@ module Unicorn
       out = [ "#{Const::DATE}: #{Time.now.httpdate}\r\n" ]
       sent = { Const::CONNECTION => true, Const::DATE => true }
 
-      headers.each_pair do |key, value|
+      headers.each do |key, value|
         if ! sent[key] || ALLOWED_DUPLICATES[key]
           sent[key] = true
           out << "#{key}: #{value}\r\n"