diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-02-13 22:56:36 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-02-13 22:56:36 -0800 |
commit | 92f412c8ead79524da5b823028dda14864f7f8ae (patch) | |
tree | cab15a121ec8c27cf31fe9f2cea424cad747bc9a /lib/unicorn/http_response.rb | |
parent | 8215e3d17884e6e08d552ae89e067edd331ea05b (diff) | |
download | unicorn-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.rb | 2 |
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" |