Skip to content

Instantly share code, notes, and snippets.

@jwilkins
Forked from forforf/wrap_require.rb
Created May 24, 2013 02:04
Show Gist options
  • Save jwilkins/5640833 to your computer and use it in GitHub Desktop.
Save jwilkins/5640833 to your computer and use it in GitHub Desktop.
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