Subject: Re: How to make an array from a date range?
From: Robin Stocker <robin@ b . g
Date: Mon, 24 Apr 2006 02:11:08 +0900
References: 189906189937
In-reply-to: 189937
ara.t.howard / noaa.gov wrote:
> if you do simply use
>
> list = (a .. b).inject([]){|accum, date| accum << date}
I'm curious, is there a special reason for the use of inject here?
Doesn't the following do the same?
list = (a..b).to_a
> -a
Robin