Skip to content

Instantly share code, notes, and snippets.

@courtenay
Created August 1, 2011 16:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save courtenay/1118441 to your computer and use it in GitHub Desktop.
Save courtenay/1118441 to your computer and use it in GitHub Desktop.
simple rack app
require 'stringio'
class TestLeak
def self.call(env)
str = env["rack.input"].read
puts env.inspect
puts str
env["rack.input"] = nil
str = nil
GC.start
end
end
TestLeak.call({ 'rack.input' => StringIO.new("monkeys") })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment