how do i use a loop to fill an array?

a = []
0.upto(25) { |n| a << n }

- or -

(0..25).to_a