Issue #614 has been updated by Yusuke Endoh.

Status changed from Rejected to Assigned

Okay, reopened.

In fact, a use case is not necessarily needed.
Ultimately, what you need is an approval from matz.
But matz will require other use cases, I guess.

-- 
Yusuke Endoh <mame / tsg.ne.jp>
----------------------------------------
Feature #614: instance_method(ancestor)
https://bugs.ruby-lang.org/issues/614

Author: Thomas Sawyer
Status: Assigned
Priority: Normal
Assignee: Yukihiro Matsumoto
Category: core
Target version: 2.0.0


=begin
 Currently Module#instance_methods takes a single argument, true or false, as to whether to include all ancestor's methods. However sometimes limiting the search at a particular ancestor is helpful. Currently this requires code along the lines of:
 
     meths = []
     FooClass.ancestors[0..FooClass.ancestors.index(FooAncestor)].each do |anc|
       meths = meths | anc.instance_methods(false)
     end
 
 But it would be nice if we could simply use:
 
     instance_methods(FooAncestor)
 
 This change is, practically-speaking, backward compatible, since 'true' can be the same as 'Kernel', encompassing the entire ancestry.
 
 This change is applicable to the entire family of "methods" methods, including Kernel#methods.
 
 This change also helps eliminate the widely disliked true|false arguments.
 
 The particular use case that brought this to mind was trying to write a Module#conflict? method that lists the methods two modules or classes have in common, but excluding the methods that they share from a common ancestor.
=end



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