Unexpected behaviour when changing a variable assigned to an array element

Assume, I have a two-dimensional array
irb(main):001:0> test_array = [[4,3],[4,5],[6,7]]
=> [[4, 3], [4, 5], [6, 7]]

I want to assign the last element of it to a variable
irb(main):002:0> test = test_array.last
=> [6, 7]

And I want to change it
irb(main):003:0> test[0] += 1
=> 7

Everything seems ok so far
irb(main):004:0> test
=> [7, 7]

But why the last element of the array has changed as well?
irb(main):005:0> test_array
=> [[4, 3], [4, 5], [7, 7]]

How do I avoid this?

ruby 2.0.0p481

When you write:

test = test_array.last

now there are two variables referring to the same array: test_array[2]
and test. The assignment operator(=) in ruby is not a copy operator.
If you want to make a copy then look at the ruby docs for the Array
class, and look down the list of methods available.