From: Roger Pack Date: 2010-03-20T01:52:29+09:00 Subject: [ruby-core:28799] Re: [Feature #2065] An ancestors iterator > For DSLs that want to have method-like inheritance, the lack of an ancestors iterator is a potential and unnecessary bottleneck. �An each_ancestor iterator would, as per the benchmarks, significantly speed up a useful programming pattern that I think would be used more frequently if it were inherently faster. I hope that clarifies the purpose of this request. Potentially a bottleneck but is it actually? You could instead use #ancestors.each or roll your own... class Module def each_ancestor ancestors.each{|a| yield(a)} end end or a faster version (if you can cache) class Module def each_ancestor @ancestors ||= ancestors @ancestors.each{|a| yield(a)} end end Cheers. -rp