> x, y = 2, 3  #you get these values from the user
> m = []  #initializing m for scope reasons
> x.times { m << Array.new( y ) }  # adding new arrays to m

Or maybe:

Array.new(x) {Array.new(y)}