From: Garthy D Date: 2013-04-17T13:07:54+09:00 Subject: Re: Delete method also deletes the original variable Hi Vincent, Try array1.dup, eg: array2 = array1.dup Cheers, Garth On 17/04/13 13:21, Vincent Stowbunenko wrote: > Suppose a code is like this: > > array1 = [1,2,3,4,5] > array2 = array1 > array2.delete(1) > > And the result was: > > array2 => [2,3,4,5] > array1 => [2,3,4,5] > > How do I make sure the first array stays original after the modification > of second array? >