From 79c270990ec3a657c23510ee4f2f7f2b4c2c748f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 27 Sep 2009 20:48:20 -0700 Subject: Remove "Z" constant for binary strings We've started using magic comments to ensure any strings we create are binary instead. Additionally, ensure we create any StringIO objects with an explicit string (which default to binary) to ensure the StringIO object is binary. This is because StringIO.new (with no arguments) will always use the process-wide default encoding since it does not know about magic comments (and couldn't, really...) --- lib/unicorn.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'lib/unicorn.rb') diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 392d301..de61c09 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -15,10 +15,6 @@ module Unicorn autoload :TeeInput, 'unicorn/tee_input' autoload :Util, 'unicorn/util' - Z = '' # the stock empty string we use everywhere... - Z.force_encoding(Encoding::BINARY) if Z.respond_to?(:force_encoding) - Z.freeze - class << self def run(app, options = {}) HttpServer.new(app, options).start.join -- cgit v1.2.3-24-ge0c7