Ruby/Array/clone
Материал из Wiki.crossplatform.ru
Версия от 17:10, 26 мая 2010; (Обсуждение)
Using the clone method is the actual way of copying between arrays.
a = [1,2,3,4,5] b = a.clone puts b a = [1,2,3,4,5] b = a.collect{|x| 10*x} puts b