Sam Ruby wrote:
All objects also must be able to perform the method:

get_anonymous_subclass - to put the object into a singleton anonymous
subclass


Sorry, you lost me here.


A singleton object is the sole instantiation of a class. You'll always
get that one object.


I know what a singleton is. I don't know what it means to "put the object into a singleton anonymous subclass", or why you would want to do such a thing.


I think that this is in order to supports Ruby's feature of being able add methods to individual objects.

In the following code

class A
end

a = A.new
def a.method()
end

this creates an anomynous subclass of A and makes a an instance of the
new class.

--
Mark Sparshatt




Reply via email to