If I have the following modules:
module Foo
end
module Foo::Bar
def print
puts "something"
end
end
Why does this usage style work?
module Foo
class Baz
include Bar
end
end
Foo::Baz.new.print
But this usage style errors with "uninitialized constant Foo::Baz::Bar (NameError)"?
class Foo::Baz
include Bar
end
Foo::Baz.new.print
Isn't the second usage case just shorthand for the first one?