fork download
  1. size_x = 3 #something
  2. size_y = 4
  3. a = Array.new(size_x) { |x| x = Array.new(size_y) }
  4. a.each do |xs|
  5. xs.each do |ys|
  6. ys = 1
  7. end
  8. end
  9. puts a.inspect
Success #stdin #stdout 0.01s 7412KB
stdin
Standard input is empty
stdout
[[nil, nil, nil, nil], [nil, nil, nil, nil], [nil, nil, nil, nil]]