Skip to content

Instantly share code, notes, and snippets.

@dandorman
Created March 13, 2015 22:29
Show Gist options
  • Save dandorman/915953ef78f144c7c718 to your computer and use it in GitHub Desktop.
Save dandorman/915953ef78f144c7c718 to your computer and use it in GitHub Desktop.
dat constant lookup tho
BLURGH = "outer blurgh"
module Foo
BLURGH = "foo blurgh"
class Bar
def blurgh
BLURGH
end
end
end
class Foo::Baz
def blurgh
BLURGH
end
end
p Foo::Bar.new.blurgh # => "foo blurgh"
p Foo::Baz.new.blurgh # => "outer blurgh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment