[ruby-core:121954] [Ruby Bug#21319] Namespaces do not support including mixins

Issue #21319 has been reported by fxn (Xavier Noria). ---------------------------------------- Bug #21319: Namespaces do not support including mixins https://bugs.ruby-lang.org/issues/21319 * Author: fxn (Xavier Noria) * Status: Open * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- The following program ```ruby module M end class C include M end ``` fails under a namespace with error ``` 'Module#include': Cannot include refinement (TypeError) ``` -- https://bugs.ruby-lang.org/

Issue #21319 has been updated by fxn (Xavier Noria). Maybe the root cause is _enabling_ namespaces with `RUBY_NAMESPACE=1`. ---------------------------------------- Bug #21319: Namespaces do not support including mixins https://bugs.ruby-lang.org/issues/21319#change-113072 * Author: fxn (Xavier Noria) * Status: Open * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- The following program ```ruby module M end class C include M end ``` fails under a namespace with error ``` 'Module#include': Cannot include refinement (TypeError) ``` -- https://bugs.ruby-lang.org/

Issue #21319 has been updated by mame (Yusuke Endoh). I cannot repro the issue. ```ruby # main.rb ns = Namespace.new ns.require "./sub" p :success ``` ```ruby # sub.rb module M end class C include M end ``` ``` $ RUBY_NAMESPACE=1 ./miniruby main.rb ./miniruby: warning: Namespace is experimental, and the behavior may change in the future! See doc/namespace.md for know issues, etc. :success ``` Can you clarify how to reproduce the issue? ---------------------------------------- Bug #21319: Namespaces do not support including mixins https://bugs.ruby-lang.org/issues/21319#change-113074 * Author: fxn (Xavier Noria) * Status: Open * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- The following program ```ruby module M end class C include M end ``` fails under a namespace with error ``` 'Module#include': Cannot include refinement (TypeError) ``` -- https://bugs.ruby-lang.org/

Issue #21319 has been updated by fxn (Xavier Noria). I was yesterday running a checkout from May 6. Updated the branch now and cannot repro anymore. ---------------------------------------- Bug #21319: Namespaces do not support including mixins https://bugs.ruby-lang.org/issues/21319#change-113083 * Author: fxn (Xavier Noria) * Status: Open * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- The following program ```ruby module M end class C include M end ``` fails under a namespace with error ``` 'Module#include': Cannot include refinement (TypeError) ``` -- https://bugs.ruby-lang.org/

Issue #21319 has been updated by fxn (Xavier Noria). I was yesterday running a checkout from May 6. Updated the branch now and cannot repro anymore. ---------------------------------------- Bug #21319: Namespaces do not support including mixins https://bugs.ruby-lang.org/issues/21319#change-113084 * Author: fxn (Xavier Noria) * Status: Open * Backport: 3.2: UNKNOWN, 3.3: UNKNOWN, 3.4: UNKNOWN ---------------------------------------- The following program ```ruby module M end class C include M end ``` fails under a namespace with error ``` 'Module#include': Cannot include refinement (TypeError) ``` -- https://bugs.ruby-lang.org/
participants (2)
-
fxn (Xavier Noria)
-
mame (Yusuke Endoh)