From: 7stud -- Date: 2008-05-18T18:07:51+09:00 Subject: Re: Object#select and method_missing ts wrote: > 7stud -- wrote: >> I tried to model how Object mixes in Kernel and thereby recreate what >> the op's results were. Is that not the way it works? > > In the example given, #select is a global function this mean > * a private method of Kernel > * a singleton method of Kernel > pickaxe2 says the the types of methods in a Module are: 1) module methods(i.e. like class methods) 2) instance methods. I guess to make things more confusing, you are calling the module methods "singleton methods". I understand why. But why are you calling the instance methods "private methods"? > This is to give the possibility to *all* objects to access these > methods > > When it's called 'self.select', ruby find the private method but > because a receiver is specified (it's called like a public method), > it call #method_missing (this was not the right method). > > When it's called 'select', it find the same method and it call it > because it was called without a receiver > > > > Guy Decoux -- Posted via http://www.ruby-forum.com/.