diff options
author | Eric Wong <e@yhbt.net> | 2011-01-17 03:17:28 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-17 09:18:31 +0000 |
commit | 2c913347a6e5cc8be776b14e1a177adec0fbd5b6 (patch) | |
tree | 8d001fa557ef23c66bc56aa6c2fba943e428382e /lib/metropolis/input_wrapper.rb | |
parent | 34a18520286313a05edc9a927ac4bed95b05191c (diff) | |
download | metropolis-2c913347a6e5cc8be776b14e1a177adec0fbd5b6.tar.gz |
use constants everywhere to reduce GC thrashing
This makes it easier to notice a typo, too.
Diffstat (limited to 'lib/metropolis/input_wrapper.rb')
-rw-r--r-- | lib/metropolis/input_wrapper.rb | 6 |
1 files changed, 4 insertions, 2 deletions
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) |