
Issue #21209 has been reported by Dan0042 (Daniel DeLorme). ---------------------------------------- Feature #21209: Endless classes and modules https://bugs.ruby-lang.org/issues/21209 * Author: Dan0042 (Daniel DeLorme) * Status: Open ---------------------------------------- Endless methods have proven popular enough that we should bring the same endlessness to module/class definitions. For a long time we've had this ugly pattern of class definitions with an extreme level of indentation. I propose a simple new rule to fix this: if a 'class' or 'module' statement is at the beginning of a line, the matching 'end' becomes optional; EOF is enough. instead of: ```ruby module Arel module Visitors class UnsupportedVisitError module ClassMethod module AmIDeepEnough module NoNotDeepEnough class LetsGoDeepter def firstmethod "man, I'm just the first method and already indented 14 spaces deep!" end end #what end #a end #chain end #we end #have end #here end #weee!!! ``` we can have the much more readable: ```ruby module Arel module Visitors class UnsupportedVisitError module ClassMethod module AmIDeepEnough module NoNotDeepEnough class LetsGoDeepter def firstmethod "now that's better!" end ``` Brilliant! -- https://bugs.ruby-lang.org/