Skip to content

Instantly share code, notes, and snippets.

@valachi
Created June 20, 2013 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save valachi/5822680 to your computer and use it in GitHub Desktop.
Save valachi/5822680 to your computer and use it in GitHub Desktop.
FOO = 'GLOBAL NAMESPACE'
module A
FOO = "IN A"
module B
FOO = 'IN B'
def self.foo
p ::FOO
end
end
end
[4] pry(main)> A::B.foo
"GLOBAL NAMESPACE"
=> "GLOBAL NAMESPACE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment