Project

General

Profile

Feature #6241

Module#method_defined? with inherited flag

Added by nobu (Nobuyoshi Nakada) over 8 years ago. Updated almost 8 years ago.

Status:
Rejected
Priority:
Normal
Target version:
[ruby-dev:45483]

Description

=begin
Currently (({Module#method_defined?})) does not accept "(({inherited}))" flags as (({Module#instance_methods})) and others.
To tell if a method is defined at an exact class/module, we have to use bad idiom:

mod.instance_methods(false).include?(:foo)

So I propose to let (({method_defined?})) and etc accept the flag.
=end


Files

0001-inherited-flag.patch (8.69 KB) 0001-inherited-flag.patch nobu (Nobuyoshi Nakada), 04/01/2012 09:01 AM

Related issues

Related to Ruby master - Feature #5673: undef_method probably doesn't need to raise an errorFeedbackmatz (Yukihiro Matsumoto)Actions

Also available in: Atom PDF