Created
September 24, 2012 03:06
-
-
Save stevez/3773970 to your computer and use it in GitHub Desktop.
alias_method
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 Mod | |
alias_method :orig_exit, :exit | |
def exit(code=0) | |
puts "Exiting with code #{code}" | |
orig_exit(code) | |
end | |
end | |
include Mod | |
exit(99) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment