Skip to content

Instantly share code, notes, and snippets.

@unrealhoang
Last active August 29, 2015 14:09
Show Gist options
  • Save unrealhoang/a87299f816f81b7f2813 to your computer and use it in GitHub Desktop.
Save unrealhoang/a87299f816f81b7f2813 to your computer and use it in GitHub Desktop.
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