From: Marcio Braga Date: 2008-08-19T07:38:39+09:00 Subject: Re: Matrix: Need help to understand this behavior > It's a Matrix, right? (some of this stolen from a previous thread)... > > require 'matrix' > class Matrix > def []=(i, j, n) > @rows[i][j] = n > end > end > > m = Matrix[['a', 'b'], ['c', 'd']] > k = m.clone > k[0, 0] = 'e' > puts k.to_a > puts m.to_a > > Todd At first I was not considering to handle them using Matrix class (just Array class) but thank you to call attention to this clone method of Matrix. Marcio -- Posted via http://www.ruby-forum.com/.