Created
April 15, 2011 23:13
-
-
Save davidjbeveridge/922631 to your computer and use it in GitHub Desktop.
In case you need to send to a private in 1.9.2:
This file contains 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 UnsafeReceiver | |
def send! meth, *args | |
unless self.respond_to? meth | |
self.class.send :public, meth | |
retval = method(meth).call(*args) | |
self.class.send :private, meth | |
return retval | |
end | |
send meth, *args | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment