>Something like:
>ruby-1.8.7-p334 :003 > class FooCollection

>Jesus.

That's cool, I like the way the class is effectively just that, a set 
that's keeping track of the objects.

Thanks.

>I would separate the leading from determining the set of instances to lead.

>robert

I don't quite understand your example code.

>class Module
>  Source = Struct.new :cl do
>    include Enumerable
>
>    def each(&b)
>      return to_enum(:each) unless b
>      ObjectSpace.each_object(cl, &b)

ObjectSpace.each_object takes, as its first argument, a module. I 
thought
:cl was an instance variable of instances of the Source class. I don't 
know much about structs, so I'd love an explanation.

Thanks Robert.

And Bryan, thanks for the explanations. I checked out weakref and it 
looks
kinda cool. Although, yeah, can't imagine using it.

-Luke

-- 
Posted via http://www.ruby-forum.com/.