Last active
March 25, 2017 11:41
-
-
Save sigmavirus24/ba7c3612f3853fa7acba to your computer and use it in GitHub Desktop.
Hiding Object#send
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 Object | |
alias :"__send!__" :__send__ | |
alias :send! :send | |
def send(*args) | |
puts "Nuh uh uh!" | |
end | |
alias :__send__ :send | |
end | |
f = Object.new | |
f.send(:lol) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment