Skip to content

Instantly share code, notes, and snippets.

@jroesch
Created June 26, 2014 21:38
Show Gist options
  • Save jroesch/0f769141e219cc3f0f07 to your computer and use it in GitHub Desktop.
Save jroesch/0f769141e219cc3f0f07 to your computer and use it in GitHub Desktop.
Ruby method resolution
class A
def m
puts "A"
end
end
module C
def m
puts "C"
end
end
class B < A
include ::C
def m
puts super
puts "B"
end
end
B.new.m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment