Skip to content

Instantly share code, notes, and snippets.

@workmad3
Created November 27, 2014 11:23
Show Gist options
  • Save workmad3/840937e05850016baa40 to your computer and use it in GitHub Desktop.
Save workmad3/840937e05850016baa40 to your computer and use it in GitHub Desktop.
module Foo
module Bar
end
end
class Foo::Bar::Quux
end
class Foo::Bar::Buz
def fails
p Module.nesting
Quux.new
end
end
module Foo::Bar
class Buz
def succeeds
p Module.nesting
Quux.new
end
end
end
buz = Foo::Bar::Buz.new
buz.succeeds
buz.fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment