Skip to content

Instantly share code, notes, and snippets.

@alg
Last active August 29, 2015 14:10
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 alg/7fbaa079e6fc3a3ce188 to your computer and use it in GitHub Desktop.
Save alg/7fbaa079e6fc3a3ce188 to your computer and use it in GitHub Desktop.
module M
def m
puts "module"
end
end
class A
def m
puts "class"
end
include M
end
class B
include M
def m
puts "class"
end
end
A.new.m # => "class"
B.new.m # => "class"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment