From: rickyr Date: 2009-10-07T00:45:05+09:00 Subject: How to do explicit copy Hi, I notice Ruby uses reference copy by default. The problem is I need to keep two variables keep separate copies of the same data. If I do this: x = Hash.new # fill a with data y = x # delete some keys from x I got those same keys deleted from y ('cos x & y reference the same data, I believe). How to tell ruby that I want y keep a separate copy of x's data, so that if I do anything to x, y is not effected. TIA