From: Robert Klemme Date: 2011-08-04T16:20:58+09:00 Subject: Re: system stack error in ObjectSpace.each_object On Wed, Aug 3, 2011 at 11:43 PM, luke gruber wrote: >>I read your post, Structs now make MUCH more sense, thanks. Should > have read before I posted above. > >>class Module >>  Source = Struct.new :cl do > > So this is effectively creating a Source class that inherits from class > Struct and takes one argument to its constructor (initialize method)... Plus, you will have one pair of accessors for "cl" and a few more things (e.g. access via [] like for a Hash). > But my question still stands on whether or not the 'include Enumerable' > was just for clarification and to be explicit, because unless I'm wrong > class Struct includes Enumerable and Source is a child of class Struct, > inheriting #each. You're absolutely right. I wanted to make it explicit but of course it's superfluous in this case. Should have added a comment. Sorry for the confusion. > Thanks for your patience, your blog looks like it's full of info. I've > gotta catch up on all the holes in my Ruby knowledge :) Thank you for the feedback! And I need to catch up writing... Oh well. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/