From: Dave Thomas Date: 2001-05-18T04:17:44+09:00 Subject: [ruby-talk:15340] Re: How to clone an object? Jim Freeze writes: > Thanks, that works well. But, what if a is private. > > class K > def initialize > @a = [1,2] > end > > def clone > copy = super > copy.a = @a.dup > copy > end > end You could cheat and use instance_eval, or do something like attr_reader :a protected :a Dave