From: "Y. NOBUOKA" Date: 2010-11-11T21:10:25+09:00 Subject: Re: what's an object? Did you recognize the difference between a method and a Method object? They are quite different. A Method object is a object which wrap a method that is bound to a specific object. > One does not need to know the internal details - such as "the 4th and > 5th paragraphs of Section 6.1 of the Ruby Language Specification (lines > 29-34 and 1-5 on pages 5 and 6)" - to be an effective programmer in > Ruby. Yes. I agree that one does not need to know the internal details. However, the difference between a Method object and a method is not the internal details. The relation between a method and a Method object in Ruby can be compared to the relation between a function and a structure which have a function pointer in C. --- in C /** * here define a structure which have a function pointer * this structure is equivalent to the Method class in Ruby */ typedef struct { int (*pointer)( int arg ); } Fuction; /** * here define a function to obtain a Function structure */ Function *obtain_Function( int (*pointer)( int arg ) ) { Function *f = malloc( sizeof( Function ) ); f->pointer = pointer; return f; } /* here is a function */ int func( int arg ) { return arg * 2; } /* obtain the Function structure which wrap the function *func* */ Function *func_obj = obtain_Function( func ); --- --- in Ruby /* here is a method */ def meth( arg ) return arg * 2; end /* obtain the Method object which wrap the method *meth* */ meth_obj = method( :meth ) --- Can you recognize the difference between a method and a Method object? In C, the Function structure is exactly a structure, while the function *func* is not. In Ruby, similarly, the Method object is a object and the method *meth* is not. I think that Ruby users need not know how a Method object wraps a method, but they should know the fact that a Method object wraps a method and a method is not a object. Regards, -- NOBUOKA Yuya