From: Brian Candler Date: 2010-05-04T20:37:04+09:00 Subject: Re: Calculation in a block Alex DeCaria wrote: > >> numbers = [1..1000] > > In your code, numbers is an array with a single element. That single > element is a range of numbers from 1..1000. Instead, don't you want > numbers to be an array like [1, 2, 3, 4, 5, ..., 999, 1000]? You can > create this array by > > numbers = Array.new(1000) { |i| i+1 } or: numbers = (1..1000).to_a -- Posted via http://www.ruby-forum.com/.