From: Marcio Braga Date: 2008-08-17T23:53:54+09:00 Subject: Re: Matrix: Need help to understand this behavior Zacek and all: how to duplicate a matrix that has elements that are also matrix ? For example: a = [[1]] b = a.dup puts a.object_id puts b.object_id puts a[0].object_id # the same object puts b[0].object_id # the same object b[0][0] = 2 * b[0][0] p a p b So, matrix "a" and "b" are different objects but each internal matrix element continue to be the same object. Do I need to duplicate each one ? Thank you Marcio -- Posted via http://www.ruby-forum.com/.