
Issue #21155 has been reported by artur86 (Artur *). ---------------------------------------- Feature #21155: File scoped namespace declarations as in C# https://bugs.ruby-lang.org/issues/21155 * Author: artur86 (Artur *) * Status: Open ---------------------------------------- Given there is a class that needs to be namespaced. `module` requires indenting the class by one level: ```ruby module MyNamespace class MyClass; end end ``` Scope resolution operator (`::`) does not require it, but it works differently than using `module` and repeating module name for every class inside seems tedious and verbose to me: ```ruby class MyNamespace::MyClass; end class MyNamespace::MyAnotherClass; end class MyNamespace::OneMoreClass; end end ``` What if something similar to [File Scoped Namespaces in C#](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals...) would be implemented in Ruby? The concept basically states as "everything in this file should be in some module", as it is formulated in [a question on StackOverflow](https://stackoverflow.com/q/40809717/2987689). -- https://bugs.ruby-lang.org/