Project

General

Profile

Feature #11879

`Module#prepended_modules`

Added by sawa (Tsuyoshi Sawada) about 4 years ago. Updated 21 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:72494]

Description

Module#included_modules include prepended modules:

module A; end
module B; end
A.prepend B
A.included_modules # => [B]

This is confusing, and is not useful. I think prepended modules should not be included in Module#included_modules.

A.included_modules # => []

I also propose that prepended modules should be included in a new method Module#prepended_modules:

A.prepended_modules # => [B]

Related issues

Is duplicate of Ruby master - Feature #8026: Need Module#prepended_modulesFeedbackActions

History

#1

Updated by nobu (Nobuyoshi Nakada) about 4 years ago

  • Is duplicate of Feature #8026: Need Module#prepended_modules added

Updated by nobu (Nobuyoshi Nakada) about 4 years ago

  • Description updated (diff)

Updated by sawa (Tsuyoshi Sawada) 21 days ago

Indeed this issue is a duplicate. Please close this.

#4

Updated by Eregon (Benoit Daloze) 21 days ago

  • Status changed from Open to Closed

Also available in: Atom PDF