From: SASADA Koichi Date: 2010-11-15T17:42:22+09:00 Subject: [ruby-core:33191] Re: Modules twice Hi, I'm sorry, I missed to posted this article which is for ruby-dev (Japanese dev mailing list). I try to translate this post. 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? (2010/11/15 17:35), SASADA Koichi wrote: >  ささだです。 > > http://www.rubyist.net/~matz/#f20101113-01-01 >> *1 MacRubyでは違うらしい。Ruby 1.9でそのような変更をしたかったが、 > YARVが継承ラインに同じモジュールが2度登場しないことを前提にしていたため断念 > >  仕様がそうなっていたことに依存した実装としているため、そのような仕様で > あるべきである、ということであれば、変更します。 > >  具体的には、super したときに、実際にどのメソッドを呼び出すか、という探 > 索において、同じ Module は 1 度しか現れない、という前提を用いて探索を > 行っています。 > >  しかし、2度登場するとなると、さて super は誰が呼ばれるんだろう? > -- // SASADA Koichi at atdot dot net