Skip to content

Instantly share code, notes, and snippets.

@ahoward
Created December 10, 2010 20:06
Show Gist options
  • Save ahoward/736721 to your computer and use it in GitHub Desktop.
Save ahoward/736721 to your computer and use it in GitHub Desktop.

Revisions

  1. ahoward created this gist Dec 10, 2010.
    16 changes: 16 additions & 0 deletions net-http-debug.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@

    BEGIN {

    require 'net/http'

    Net::HTTP.module_eval do
    alias_method '__initialize__', 'initialize'

    def initialize(*args,&block)
    __initialize__(*args, &block)
    ensure
    @debug_output = $stderr ### if ENV['HTTP_DEBUG']
    end
    end

    }