While this works, there's a much simpler way to produce an array of sequential numbers in ruby. Check out the ruby Range class http://ruby-doc.org/core-2.0/Range.html

You can create a range like this:

(1..10)

And transform it into an array using the to_a method:

(1..10).to_a

So you could simplify your code like this:

@number = (1..10).to_a