MethodError for same type after includes / modules

Again, you don’t need to doubly-include anything. includeing a file C-style is not the same as namespacing/giving access to the same name. If you have file A, B and C and you include B and C in A, both B and C will see each others definitions. If B and C contain modules, you can traverse the namespace with e.g using to get at those definitions, no additional include required.

That’s what I mean when I say “only place include at the top level module/file”, which in this example is file A.

3 Likes