From: "fxn (Xavier Noria)" Date: 2022-06-21T05:50:26+00:00 Subject: [ruby-core:109030] [Ruby master Feature#18832] Do not have class/module keywords consider ancestors of Object Issue #18832 has been updated by fxn (Xavier Noria). Awesome, thanks Jeremy. ---------------------------------------- Feature #18832: Do not have class/module keywords consider ancestors of Object https://bugs.ruby-lang.org/issues/18832#change-98146 * Author: fxn (Xavier Noria) * Status: Open * Priority: Normal ---------------------------------------- The following code: ```ruby module M class C end end include M p Object.const_defined?(:C, false) class C < String # (1) end ``` prints `false`, as expected, but then raises `superclass mismatch for class C (TypeError)` at (1). I believe this is a bug, because `Object` itself does not have a `C` constant, so (1) should just work, and the superclasse of `M::C` should be irrelevant. -- https://bugs.ruby-lang.org/ Unsubscribe: