```On Sep 9, 10:50 ¨Βν¬ φεξλατεσΠεδδΌφεξλατ®πε®®®ΐθοτναιμ®γονΎ χςοτεΊ
> the easy way is you can have another temp variable to which u have to assign the old value.and assing the temp value to new. in this case when u change the new the temp will change but not old.
>
> temp var = old var
>
> new var = temp var
>
> // here u can do what ever u want on new. unless u directly change any thing on temp ur old var is safe.

What are you talking about? Why would that work? Why would there be
any difference between `x = a; b = x` and `b = a`?

>> a = [1,2,3]
>> x = a
>> b = x
>> b[2] = 4
>> b
=> [1, 2, 4]
>> a
=> [1, 2, 4]

Mason, you're going to want to make an actual copy of the original
variable, not simply a new pointer to it (which is what you get when
you do something like `b = a`). In many cases, calling .dup or .clone
will work. (As in `b = a.dup` or `b = a.clone`.)

However, since you have an array of arrays, you're going to need a
"deep copy". I believe `b = Marshal.load(Marshal.dump(a))` is the
standard idiom.

--
-yossef

```