[ruby-core:96660] [Ruby master Feature#10797] `inherit` parameter for `..._defined?` methods in Module

From: sawadatsuyoshi@...
Date: 2020-01-04 18:48:27 UTC
List: ruby-core #96660
Issue #10797 has been updated by sawa (Tsuyoshi Sawada).


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.

----------------------------------------
Feature #10797: `inherit` parameter for `..._defined?` methods in Module
https://bugs.ruby-lang.org/issues/10797#change-83630

* Author: sawa (Tsuyoshi Sawada)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
`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.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next