Skip to content

Instantly share code, notes, and snippets.

View wkjagt's full-sized avatar

Willem van der Jagt wkjagt

  • Shopify
  • Oka (Montreal area)
View GitHub Profile
require 'net/http'
module Net
class HTTP
def self.enable_debug!
raise "You don't want to do this in anything but development mode!" unless Rails.env == 'development'
class << self
alias_method :__new__, :new
def new(*args, &blk)
instance = __new__(*args, &blk)
instance.set_debug_output($stderr)