Skip to content

Instantly share code, notes, and snippets.

@jgagner
Created January 29, 2010 18:23
Show Gist options
  • Save jgagner/289955 to your computer and use it in GitHub Desktop.
Save jgagner/289955 to your computer and use it in GitHub Desktop.
use Rack::Logger
app = proc do |env|
[ 200, {'Content-Type' => 'text/plain'}, "a" ]
end
run app
#This will produce:
# Rack::Lint::LintError: rack.errors#close must not be called
/opt/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:18:in `assert'
/opt/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:417:in `close'
/opt/local/lib/ruby/1.8/logger.rb:510:in `close'
/opt/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/local/lib/ruby/1.8/logger.rb:509:in `close'
/opt/local/lib/ruby/1.8/logger.rb:418:in `close'
/opt/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/logger.rb:17:in `call'
/opt/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/lint.rb:47:in `_call'
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment