Can someone shed some light on this problem. In the example, I am
attempting to concatenate two arrays together. However it appears that
the contents of the first array is being altered after using the concat
function even though a copy of the array is being used. Am I doing
something wrong here, or is this a potential bug?

Thanks

one = [[1],[2]]
two = [['a'],['b']]

puts one.inspect

newArray =[]
count = 0

tempArr = Array.new(one)

tempArr.each do |x|
  x = x.concat(two.values_at(count))
  newArray = newArray.push(x)
  count = count + 1
end

puts one.inspect

-- 
Posted via http://www.ruby-forum.com/.