Last active
August 29, 2015 14:09
-
-
Save unrealhoang/a87299f816f81b7f2813 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 | |
module B | |
def self.hello | |
"hello root" | |
end | |
end | |
end | |
A::B.hello # => “hello root” | |
::A::B.hello # => “hello root” | |
module C | |
module A | |
module B | |
def self.hello | |
"hello inner" | |
end | |
end | |
end | |
A::B.hello # => “hello inner” | |
::A::B.hello # => “hello root” | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment