Created
June 15, 2011 10:28
-
-
Save LTe/1026851 to your computer and use it in GitHub Desktop.
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
class Proc | |
alias :original_call :call | |
def call | |
puts "custom call from proc" | |
original_call | |
super if defined? super | |
end | |
end | |
proc = Proc.new do | |
puts "hello i'm proc!" | |
end | |
proc.call |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment