From: Fleck Jean-Julien Date: 2009-08-08T00:24:44+09:00 Subject: Re: How can I copy an array and its elements? (call by value) Hello, > I'm failing at something really basic: copying an array and its > contents, so that I can modify the copy without modifying the original. I think the method 'dup' is what you are looking for irb(main):001:0> a = [1,2] => [1, 2] irb(main):002:0> b = a.dup => [1, 2] irb(main):003:0> b.delete(1) => 1 irb(main):004:0> b => [2] irb(main):005:0> a => [1, 2] Cheers, -- JJ Fleck PCSI1 Lycée Kleber