Skip to content

Instantly share code, notes, and snippets.

@davidjbeveridge
Created April 15, 2011 23:13
Show Gist options
  • Save davidjbeveridge/922631 to your computer and use it in GitHub Desktop.
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:
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