Skip to content

Instantly share code, notes, and snippets.

@nahi
Created Oct 15, 2012
Embed
What would you like to do?
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