I have a question about ruby, I still can not figure out how to use a matrix. In java I can do this:
int matriz[][] = new int[3][3]
and to get a matrix by keyboard I go through two for matrix[i][j] = dato
.
Now I want to implement the same in ruby, which I can not understand, because there is a Matrix class but I do not know how to use it. I know that in ruby I can do this too:
arreglo=[[1,2,4],[2,3,4],[7,8,9]]
but I do not understand how I could fill it in a for from the keyboard, some help?