Project

General

Profile

Actions

Feature #8846

closed

Publicize Module#include

Added by matsuda (Akira Matsuda) over 11 years ago. Updated over 11 years ago.

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

Description

I propose changing Module#include to a public method.

  • Background
    Module#include is currently a private method.
    However, the method is actually quite often used (particularly by gem library authors) for appending some features from outside of the target module, such as:

    ActiveRecord::Base.send :include, MyPagination

  • Use case
    % cd rails
    % git grep "send[ (]:include," | wc -l
    45


Files

public_include.pdf (37.3 KB) public_include.pdf matsuda (Akira Matsuda), 08/31/2013 02:17 PM

Related issues 2 (0 open2 closed)

Related to Ruby master - Feature #6539: public and private for core methodsClosednobu (Nobuyoshi Nakada)Actions
Related to Ruby master - Feature #12697: Why shouldn't Module meta programming methods be public?Closedmatz (Yukihiro Matsumoto)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0