From 70c976bdd85bb8515fea01d6ad6074ef472fc2e0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 14 Nov 2015 02:47:24 +0000 Subject: reduce constant lookup dependencies Unicorn 5 removes some constants we were using, and constant lookups + inline caching are waste of time anyways on newer Rubies with the opt_str_freeze bytecode instruction. This may reduce performance for folks on older Rubies (probably not noticeable); but improves performance for folks on newer Rubies. --- lib/rainbows/coolio/thread_client.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rainbows/coolio/thread_client.rb') diff --git a/lib/rainbows/coolio/thread_client.rb b/lib/rainbows/coolio/thread_client.rb index ee9fa04..4de705f 100644 --- a/lib/rainbows/coolio/thread_client.rb +++ b/lib/rainbows/coolio/thread_client.rb @@ -8,7 +8,7 @@ class Rainbows::Coolio::ThreadClient < Rainbows::Coolio::Client def app_call input KATO.delete(self) disable if enabled? - @env[RACK_INPUT] = input + @env['rack.input'] = input app_dispatch # must be implemented by subclass end @@ -25,7 +25,7 @@ class Rainbows::Coolio::ThreadClient < Rainbows::Coolio::Client # here because that could cause a deadlock and we'd leak FDs def app_response begin - @env[REMOTE_ADDR] = @_io.kgio_addr + @env['REMOTE_ADDR'] = @_io.kgio_addr @hp.hijack_setup(@env, @_io) APP.call(@env.merge!(RACK_DEFAULTS)) rescue => e -- cgit v1.2.3-24-ge0c7