Project

General

Profile

Actions

Bug #21319

closed

Namespaces do not support including mixins

Bug #21319: Namespaces do not support including mixins

Added by fxn (Xavier Noria) 6 months ago. Updated 6 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:121954]

Description

The following program

module M
end

class C
  include M
end

fails under a namespace with error

'Module#include': Cannot include refinement (TypeError)

Related issues 1 (0 open1 closed)

Related to Ruby - Bug #21321: Namespaces do not support extending mixinsClosedActions

Updated by fxn (Xavier Noria) 6 months ago Actions #1 [ruby-core:121958]

Maybe the root cause is enabling namespaces with RUBY_NAMESPACE=1.

Updated by mame (Yusuke Endoh) 6 months ago Actions #2 [ruby-core:121960]

I cannot repro the issue.

# main.rb
ns = Namespace.new
ns.require "./sub"

p :success
# 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?

Updated by mame (Yusuke Endoh) 6 months ago Actions #3

  • Related to Bug #21321: Namespaces do not support extending mixins added

Updated by fxn (Xavier Noria) 6 months ago Actions #4 [ruby-core:121967]

I was yesterday running a checkout from May 6. Updated the branch now and cannot repro anymore.

Updated by byroot (Jean Boussier) 6 months ago Actions #5

  • Status changed from Open to Closed
Actions

Also available in: PDF Atom