Brian Schr?der wrote:

> Interesting. But this won't work for instance variables that point to
> arrays of deep_copy-able objects. Right?

I knew you'd spot that :-) In a couple of cases I had to replace Arrays with 
something like this:

        class Content < Array 
            def deep_copy
                copy = self.class.new
                each do |c|
                    copy << case
                        when c.nil?
                            nil
                        when c.respond_to?(:deep_copy)
                            c.deep_copy
                        when c.respond_to?(:dup)
                            c.dup
                        else
                            c
                        end
                end
                return copy
            end
        end 

And, yes, I have to be careful not to use methods that return Array objects.