def get2DArray(oneDarray) #oneDarray is of dimention 1Xn^2
###what will be the code here??
return twoDarray
end

oneDarray is a one dimensional array, and is of dimention 1Xn^2, I would
like to assign this to two dimentional array namd twoDarray so that I
can get the first row as twoDarray[i].

for example:
oneDarray=[1,2,3,4,5,6,7,8,9]
gives
twoDarray=[[1,2,3],[4,5,6],[7,8,9]]
and twoDarray[1]=[4,5,6]

Help me to write code at ###

-- 
Posted via http://www.ruby-forum.com/.