about summary refs log tree commit
path: root/lib/metropolis/input_wrapper.rb
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2011-01-17 03:17:28 +0000
committerEric Wong <normalperson@yhbt.net>2011-01-17 09:18:31 +0000
commit2c913347a6e5cc8be776b14e1a177adec0fbd5b6 (patch)
tree8d001fa557ef23c66bc56aa6c2fba943e428382e /lib/metropolis/input_wrapper.rb
parent34a18520286313a05edc9a927ac4bed95b05191c (diff)
downloadmetropolis-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.rb6
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)