Created
October 26, 2009 18:11
-
-
Save no6v/218887 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Rack | |
class Lint | |
unless method_defined?(:call_with_close) | |
def call_with_close(env = nil) | |
call_without_close(env).tap do |status, headers, body| | |
body.close if body.respond_to?(:close) | |
end | |
end | |
alias_method_chain :call, :close | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment