diff options
author | Eric Wong <e@80x24.org> | 2015-11-21 08:52:30 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-11-21 08:54:43 +0000 |
commit | e40421d475def4ee9e6eb4b6ec7b00da2b5f59d5 (patch) | |
tree | 03bc71152809d73a84fd7b0f53b1710e06174155 /lib/rainbows/response.rb | |
parent | 8fe5c0d649fa930c9027df42a2de9bb23f6ef8b8 (diff) | |
download | rainbows-e40421d475def4ee9e6eb4b6ec7b00da2b5f59d5.tar.gz |
Even with frozen string literals enabled in Ruby 2.3.0dev, dstrings still create garbage as the optimizer is not yet smart enough to optimize it despite the limited choice of internals being known. Maybe in the future Ruby will be smart enough, but not yet...
Diffstat (limited to 'lib/rainbows/response.rb')
-rw-r--r-- | lib/rainbows/response.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rainbows/response.rb b/lib/rainbows/response.rb index 0b5e542..3e48c65 100644 --- a/lib/rainbows/response.rb +++ b/lib/rainbows/response.rb @@ -46,8 +46,8 @@ module Rainbows::Response end end end - write(buf << "Connection: #{alive ? 'keep-alive'.freeze - : 'close'.freeze}\r\n\r\n") + write(buf << (alive ? "Connection: keep-alive\r\n\r\n".freeze + : "Connection: close\r\n\r\n".freeze)) if hijack body = nil # ensure caller does not close body |