Project

General

Profile

Feature #10797

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

Added by sawa (Tsuyoshi Sawada) almost 5 years ago.

Status:
Open
Priority:
Normal
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.

Also available in: Atom PDF