Created
October 23, 2017 18:52
-
-
Save danny-andrews/cf363303bff4bb5ce4fa169cc16d2c39 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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