From 04c7fc37ab4fb2fbaa1b4a2570871713cf9d1319 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 16 Sep 2009 16:56:22 -0700 Subject: Avoid freezing objects that don't benefit from it This gives applications more rope to play with in case they have any reasons for changing some values of the default constants. Freezing strings for Hash assignments still speeds up MRI, so we'll keep on doing that for now (and as long as MRI supports frozen strings, I expect them to always be faster for Hashes though I'd be very happy to be proven wrong...) --- lib/unicorn/app/old_rails/static.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/unicorn/app/old_rails/static.rb') diff --git a/lib/unicorn/app/old_rails/static.rb b/lib/unicorn/app/old_rails/static.rb index a1f3b6b..1a78a23 100644 --- a/lib/unicorn/app/old_rails/static.rb +++ b/lib/unicorn/app/old_rails/static.rb @@ -20,7 +20,7 @@ # with Unicorn and you should see a decent speed boost (but not as # fast as if you use a static server like nginx). class Unicorn::App::OldRails::Static < Struct.new(:app, :root, :file_server) - FILE_METHODS = { 'GET' => true, 'HEAD' => true }.freeze + FILE_METHODS = { 'GET' => true, 'HEAD' => true } REQUEST_METHOD = 'REQUEST_METHOD'.freeze REQUEST_URI = 'REQUEST_URI'.freeze PATH_INFO = 'PATH_INFO'.freeze -- cgit v1.2.3-24-ge0c7