size_x = 3 #somethingsize_y = 4a = Array.new(size_x) { |x| x = Array.new(size_y) }a.each do |xs| xs.each do |ys| ys = 1 endendputs a.inspect
Standard input is empty
[[nil, nil, nil, nil], [nil, nil, nil, nil], [nil, nil, nil, nil]]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!