From: John Mair Date: 2010-11-12T16:51:07+09:00 Subject: Re: what's an object? @Josh, I agree with Yehuda too. But I do not feel the case of Method objects/methods is analogous to the case of blocks/procs. The fundamental reason is that a very crucial point of Yehuda's argument is that when you on-pass the block it has the same object_id; in fact in Yehuda's article this point is mentioned multiple times culiminating in this statement: "You can tell that blocks are not being semantically wrapped and unwrapped because blocks passed along via & share the same object_id across methods." This semantic wrapping/unwrapping on the other hand is EXACTLY what's happening in the case of methods and method objects. In other words, what is happening with methods/method objects is precisely what Yehuda was arguing was *not* happening with blocks/procs. Yehuda's argument *would* apply to methods/method objects if the object_id remained the same across multiple calls to the method method. Read what he wrote again, the persistent object_id is a big part of his argument. To try to maintain the mental model that a method is really an object is actually impossible if the object keeps changing ;) It is not impossible in the case of blocks/procs however, as the object_id remains the same. One last example to drive it home: method(:puts).instance_variable_set(:@hello, :hello) method(:puts).instance_variagle_get(:@hello) #=> nil John -- Posted via http://www.ruby-forum.com/.