From: Ryan Davis Date: 2010-11-16T15:01:38+09:00 Subject: [ruby-core:33210] Re: Modules twice On Nov 15, 2010, at 00:42 , SASADA Koichi wrote: > Matz wrote on his blog: >> http://www.rubyist.net/~matz/#f20101113-01-01 >> Note 1: I want to change that same module appear on the ancestors on > Ruby 1.9. However, YARV depends on current behavior (same module appear > once), I can't apply this change. > > > I made an objection. YARV implementation depends on current behavior, > however, if it is needed, I will change this implementation. > > To be specific, YARV depends on this specification to search target of > super(). > > But, if same modules appear on the ancestors twice or more, how to > search the super() target? Personally I think it is an awesome idea. module Reversed def <=> target -super end end class Object def -@ self.dup.extend Reversed end end p b.sort_by { |(num, str)| [ -str, num ] } I would love it if something like this could be applied any number of times and have it work the way you'd expect.