On Sun, Dec 6, 2009 at 2:34 PM, David A. Black <dblack / rubypal.com> wrote:
>
> As others have said, there are better ways (mainly File.readlines). As
> for map/collect in general: it's hard to come up with a useful value
> when it's called without a block.

The use case I can see is to turn an Enumerable into an Array. Which
means that you should be using to_a instead, and checking,
File.open("foo").to_a does indeed do the right thing.

martin