fork download
  1. $cells = []
  2. $a = []
  3. 5.times do
  4. $a.push(0)
  5. end
  6. 3.times do
  7. $cells.push($a)
  8. end
  9.  
  10. (0...3).to_a.each do |i|
  11. (0...5).to_a.each do |j|
  12. $cells[i][j] = "i: #{i}, j: #{j}"
  13. end
  14. end
  15.  
  16. puts $cells[0][0]
Success #stdin #stdout 0s 4716KB
stdin
Standard input is empty
stdout
i: 2, j: 0