[#109207] [Ruby master Feature#18915] New error class: NotImplementedYetError or scope change for NotImplementedYet — Quintasan <noreply@...>
Issue #18915 has been reported by Quintasan (Michał Zając).
18 messages
2022/07/14
[ruby-core:109275] [Ruby master Feature#18832] Do not have class/module keywords consider ancestors of Object
From:
"mame (Yusuke Endoh)" <noreply@...>
Date:
2022-07-21 11:49:25 UTC
List:
ruby-core #109275
Issue #18832 has been updated by mame (Yusuke Endoh). We discussed this ticket at the dev meeting. @matz said he wanted to try the change, i.e., `include M; class C; end` at the toplevel should define `::C` instead of reopening `M::C`. He may revisit the change if a compatibility issue is found. ---------------------------------------- Feature #18832: Do not have class/module keywords consider ancestors of Object https://bugs.ruby-lang.org/issues/18832#change-98407 * 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: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>