Project

General

Profile

Actions

Backport #8025

closed

Module#included_modules includes classes

Added by marcandre (Marc-Andre Lafortune) about 11 years ago. Updated almost 11 years ago.


Description

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.


Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #8841: Module#included_modules and prepended modulesClosedmatz (Yukihiro Matsumoto)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0