Created
October 5, 2022 13:14
-
-
Save sinsoku/250ab5e9e6261800edf863a6c22999b0 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; end | |
module B; end | |
module C; end | |
class Foo | |
include A | |
include B | |
include C | |
end | |
class Bar | |
include A, B, C | |
end | |
p Foo.ancestors | |
#=> [Foo, C, B, A, Object, Kernel, BasicObject] | |
p Bar.ancestors | |
#=> [Bar, A, B, C, Object, Kernel, BasicObject] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment