Skip to content

Instantly share code, notes, and snippets.

@ncancelliere
Created April 9, 2015 20:55
Show Gist options
  • Save ncancelliere/8bfe067b3a2c7f4e61ac to your computer and use it in GitHub Desktop.
Save ncancelliere/8bfe067b3a2c7f4e61ac to your computer and use it in GitHub Desktop.
Debug Net::HTTP from console
module Net
class HTTP
alias_method '__initialize__', 'initialize'
def initialize(*args,&block)
__initialize__(*args, &block)
ensure
@debug_output = $stderr ### if ENV['HTTP_DEBUG']
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment