Skip to content

Instantly share code, notes, and snippets.

@danny-andrews
Created October 23, 2017 18:52
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 danny-andrews/cf363303bff4bb5ce4fa169cc16d2c39 to your computer and use it in GitHub Desktop.
Save danny-andrews/cf363303bff4bb5ce4fa169cc16d2c39 to your computer and use it in GitHub Desktop.
module A
def msg
'hello'
end
end
module B
def msg
'hi'
end
end
class Sample
include B
include A
end
a = Sample.new
puts a.msg # What gets printed? Depends on order of includes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment