You have to create ranges in ascending sequence
(1..10).to_a this will give you an empty array: (10..1).to_a