Issue #8025 has been updated by nagachika (Tomoyuki Chikanaga).

Assignee changed from nagachika (Tomoyuki Chikanaga) to nobu (Nobuyoshi Nakada)

Hello,

A problem seems to remain in case of inherited Class was prepended by a Module.
See the following sample.


module M1; end

class C1
  prepend M1
end

class C2 < C1
end

p C1.included_modules # => [M1, Kernel]
p C2.included_modules # => [M1, C1, Kernel]

Thanks,
----------------------------------------
Backport #8025: Module#included_modules includes classes
https://bugs.ruby-lang.org/issues/8025#change-39206

Author: marcandre (Marc-Andre Lafortune)
Status: Assigned
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: 
Target version: 


I see two problems in the following code:

    module Mixin
    end

    class C
      prepend Mixin
    end

    C.included_modules # => [Mixin, C, Kernel]

1) C should definitely not be there, since no class should ever appear in that list.

2) I wonder if Mixin should be there, since it was prepended to C, not included.


-- 
http://bugs.ruby-lang.org/