Project

General

Profile

Actions

Feature #10797

closed

`inherit` parameter for `..._defined?` methods in Module

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

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

Description

Module#const_defined? takes an optional argument inherit with default value true to control whether to consider inheritance. But the following methods do not:

  • Module#method_defined?
  • Module#private_method_defined?
  • Module#protected_method_defined?
  • Module#public_method_defined?

They only allow what would correspond to inherit = true. I request an optional argument inherit with default value true to be added to these methods to control whether inheritance should be considered.


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Feature #14944: Support optional inherit argument for Module#method_defined?ClosedActions

Updated by sawa (Tsuyoshi Sawada) about 4 years ago

This proposal was adopted in Ruby 2.6 (and is mentioned in the context of #14944, which is actually a duplicate of the current issue). Please close this issue.

Actions #2

Updated by Eregon (Benoit Daloze) about 4 years ago

  • Status changed from Open to Closed
Actions #3

Updated by Eregon (Benoit Daloze) about 4 years ago

  • Is duplicate of Feature #14944: Support optional inherit argument for Module#method_defined? added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0