Created
November 8, 2011 21:22
-
-
Save forforf/1349281 to your computer and use it in GitHub Desktop.
Wrapped Require
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 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