-
-
Save anonymous/c240fd797e8c6a1072c3 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 | |
class Bar | |
end | |
class Foo | |
def bar | |
# this works fine | |
Bar.new | |
end | |
end | |
end | |
A::Foo.new.bar | |
module B | |
end | |
class B::Bar | |
end | |
class B::Foo | |
def bar | |
# this does not work: uninitialized constant B::Foo::Bar | |
Bar.new | |
end | |
end | |
B::Foo.new.bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment