Last active
January 27, 2020 21:02
-
-
Save DimaSamodurov/812510125353550ef6264b0da71e859c 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 foo | |
:a | |
end | |
end | |
module B | |
def foo | |
:b | |
end | |
end | |
module D | |
def foo | |
:d | |
end | |
end | |
module F | |
def foo | |
:f | |
end | |
end | |
module H | |
def foo | |
:h | |
end | |
end | |
class C | |
include A | |
prepend B | |
def foo | |
:c | |
end | |
end | |
c = C.new | |
def c.foo | |
:e | |
end | |
c.extend D | |
c.singleton_class.include F | |
c.singleton_class.prepend H | |
c.foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment