Hi,

The next code snippet:

arr       = []
code    = []

code[0] = 'op1'
code[1] = '_'
code[2] = '_'
code[3] = 1

arr[0]   = code
puts arr.inspect

code[0] = 'op2'
code[3] = 2

arr[1]= code
puts arr.inspect

Produces the next result:

[["op1", "_", "_", 1]]
[["op2", "_", "_", 2], ["op2", "_", "_", 2]]

However, I expected :
[["op1", "_", "_", 1]]
[["op1", "_", "_", 1], ["op2", "_", "_", 2]]

What went wrong?

Thanks in advance,

Thiel Chang