From 2c913347a6e5cc8be776b14e1a177adec0fbd5b6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 17 Jan 2011 03:17:28 +0000 Subject: use constants everywhere to reduce GC thrashing This makes it easier to notice a typo, too. --- lib/metropolis/input_wrapper.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/metropolis/input_wrapper.rb') diff --git a/lib/metropolis/input_wrapper.rb b/lib/metropolis/input_wrapper.rb index 12a1bcc..334caf6 100644 --- a/lib/metropolis/input_wrapper.rb +++ b/lib/metropolis/input_wrapper.rb @@ -1,9 +1,11 @@ # -*- encoding: binary -*- class Metropolis::InputWrapper + include Metropolis::Constants + def initialize(env) - @input = env["rack.input"] - env["rack.input"] = self + @input = env[Rack_Input] + env[Rack_Input] = self end def read(*args) -- cgit v1.2.3-24-ge0c7