array = ["one", "two", "three"]
array_copy = array
array_copy << "four"
p array
p array_copy
#=>
["one", "two", "three", "four"]
["one", "two", "three", "four"]
How can I add an element to "array_copy" and leave "array" unaltered?
Cheers.
--
Posted via http://www.ruby-forum.com/.