From: PIKI Date: 2009-11-13T22:30:16+09:00 Subject: how to copy array in ruby HI I am a novice in Ruby programming so this question might look trivial to lot of people. But I am struggling to copy an array. I am using a = [] b = a /* some manipulation here on "b" and "a" I havent touched at all*/ Here when i am trying to see contents of "a" and "b" both have same contents But my expectation was they shud be different Instead of b = a, I also tried b.replace(a) but no luck here also. Please help me on how to make a duplicate("b") of "a" so that changes done on b will not affect a Thanks Pikender Sharma