From: Tom Sawyer Date: 2003-01-04T14:16:09+09:00 Subject: Cyclic Marshals :: again the need for a built in creation parent method okay, after way too many hours i was finally able to Marshal my objects and overcome the cyclic references that caused a spiraling depth problem. unfortunately it is not a general purpose solution. i could not figure a way to do that. rather i created two methods, a #pre_dump methods that nil'd out the specific cyclic references in my objects before the #Marshal.dump and a #post_load method that restores them after the #Marshal.load. thes whole of this problem stems from the common need to store the creation parent of an object: class ParentObject def method_x c = ChildObject.new(self) end end def ChildObject def initialize(parent) @parent = parent end end i have talked about this before. this is fairly common occurance. i have heard it argued that it is better to have it explicitly defined like this, but among many other things, Marshalling is another example in which having a built in method (#creator perhaps) akin to #self would be of great use simply because the creation parent would not have to be stored in an instance variable and thus no cyclic reference would arise. -transami