Created
August 4, 2011 22:01
-
-
Save kohsuke/1126408 to your computer and use it in GitHub Desktop.
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
class B | |
private | |
def zot() | |
puts "I'm B" | |
end | |
end | |
class D < B | |
private | |
def zot() | |
puts "I'm D" | |
end | |
end | |
d = D.new | |
dzot = D.instance_method(:zot) | |
bzot = B.instance_method(:zot) | |
dzot.bind(d).call | |
bzot.bind(d).call |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment