Created
October 15, 2012 22:26
-
-
Save nahi/3896042 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 Node | |
def eval(other) | |
other.protected_method(self) | |
end | |
protected | |
def protected_method(other) | |
other | |
end | |
end | |
class NodeFake | |
def initialize(node) | |
@node = node | |
end | |
def eval(other) | |
p :pre | |
p self == other.protected_method(self) | |
p :post | |
end | |
end | |
NodeFake.new(Node.new).eval(Node.new) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment