Skip to content

Instantly share code, notes, and snippets.

@forforf
Created November 8, 2011 21:22
Show Gist options
  • Save forforf/1349281 to your computer and use it in GitHub Desktop.
Save forforf/1349281 to your computer and use it in GitHub Desktop.
Wrapped Require
module Kernel
alias :old_req :require
def require(*args)
puts "Require called with: #{args}"
old_req *args
end
end
require 'pp'
#=>
#Require called with: ["pp"]
#Require called with: ["prettyprint"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment