diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-04-21 15:31:58 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-04-21 16:23:09 -0700 |
commit | a0ee3ba2d08acb423a1cbc4a5ae862bd40c4b914 (patch) | |
tree | ca4268918acaaed138291de6a6363748b59e3adb /lib/clogger/pure.rb | |
parent | 9c6fd3814b6bed2772fc540e7824febe85e9b046 (diff) | |
download | clogger-a0ee3ba2d08acb423a1cbc4a5ae862bd40c4b914.tar.gz |
This quiets down warnings when used with RubyGems loaders such as Isolate and Bundler where the HTTP server already loaded Rack.
Diffstat (limited to 'lib/clogger/pure.rb')
-rw-r--r-- | lib/clogger/pure.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/clogger/pure.rb b/lib/clogger/pure.rb index b871c62..e9a8e6a 100644 --- a/lib/clogger/pure.rb +++ b/lib/clogger/pure.rb @@ -1,13 +1,14 @@ # -*- encoding: binary -*- # :stopdoc: -require 'rack' - # Not at all optimized for performance, this was written based on # the original C extension code so it's not very Ruby-ish... class Clogger def initialize(app, opts = {}) + # trigger autoload to avoid thread-safety issues later on + Rack::Utils::HeaderHash.new({}) + @app = app @logger = opts[:logger] (@logger.sync = true) rescue nil |