From: Yukihiro Matsumoto Date: 2007-01-24T15:25:57+09:00 Subject: Re: new method dispatch rule (matz' proposal) Hi, In message "Re: new method dispatch rule (matz' proposal)" on Wed, 24 Jan 2007 14:02:16 +0900, Daniel DeLorme writes: |Then I have one last question: | | class MessageQueue | def msg; @queue.first; end | def wait; while msg.nil?;end; end | end | module Kernel | private | def msg(x); warn x; end | end | |In this case, I believe MessageQueue#wait will invoke the Kernel#msg |utility "function" (because private methods are looked up first) rather |than the intended MessageQueue#msg. Doesn't that defeat the goal stated |above? This is very rare case that * the target class override the private method by public method * and there's a functional call of that method I think it should be warned, or maybe cause error. matz.