reduce and localize constant string use
commitae5757cdb0be1d512c4b0c3c599e681f8bd3b5fe
authorEric Wong <e@80x24.org>
Mon, 9 Feb 2015 09:12:10 +0000 (9 09:12 +0000)
committerEric Wong <e@80x24.org>
Sun, 1 Mar 2015 05:33:48 +0000 (1 05:33 +0000)
treee07c8c5f71b9172d523669034da595fdfaa1cabd
parent5fd3b3166a4ef9c0c5e4321c1b8b840840cbf24b
reduce and localize constant string use

Literal String#freeze avoids allocations since Ruby 2.1 via the
opt_str_freeze instruction, so we can start relying on it in
some places as Ruby 2.1 adoption increases.  The 100-continue
handling is a good place to start since it is an uncommonly-used
code path which benefits from size reduction and the negative
performance impact is restricted to a handful of users.

HTTP_RESPONSE_START can safely live in http_request.rb as its
usage does not cross namespace boundaries

The goal is to eventually eliminate Unicorn::Const entirely.
lib/unicorn/const.rb
lib/unicorn/http_request.rb
lib/unicorn/http_server.rb