From: Raphael Bauduin Date: 2004-03-13T22:49:38+09:00 Subject: Object#clone and Object#dup Hi, I'd like to duplicate n object, work on the copy, and be sure the original isn't change at all. How can I do that? From the pickaxe (example similar to what I'm working on): class Klass attr_accessor :str end s1 = Klass.new => # s1.str = "Hello" => "Hello" s2 = s1.dup => # s2.str[1,4] = "i" => "i" s1.str => "Hi" s2.str => "Hi" I would like that s1.str still returns "Hello". I tried with dup and clone, with the same result.... What method should I use? Thanks Raph