Project

General

Profile

Actions

Bug #21319

closed

Namespaces do not support including mixins

Added by fxn (Xavier Noria) 5 days ago. Updated 5 days 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) 5 days ago

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

Updated by mame (Yusuke Endoh) 5 days ago

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?

Actions #3

Updated by mame (Yusuke Endoh) 5 days ago

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

Updated by fxn (Xavier Noria) 5 days ago

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

Actions #5

Updated by byroot (Jean Boussier) 5 days ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0