column in your nested loop each is a copy of the value at that place in the array, not a pointer / reference to it, so when you change its value, you only change the value of the copy (which ceases to exist outside the block).
If you just need a two-dimensional array filled with 1 something simple, how this will work:
def mda(width,height) [ [1] * width ] * height end
Pretty simple.
By the way, if you want to know how to change the elements of a two-dimensional array when you repeat it, here is one way (starting at line 6 in your code):
#init all its values to 1 a.length.times do |i| a[i].length.times do |j| a[i][j] = 1 end end
source share