Skip to content

Instantly share code, notes, and snippets.

@kohsuke
Created August 4, 2011 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kohsuke/1126408 to your computer and use it in GitHub Desktop.
Save kohsuke/1126408 to your computer and use it in GitHub Desktop.
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