From: "Simon Kröger" Date: 2005-11-08T06:26:19+09:00 Subject: Re: from text file to array in shortest way Ara.T.Howard wrote: > On Tue, 8 Nov 2005, ngoc wrote: > >> books_array = Array.new() >> File.open('books_file.txt').each { |line| >> books_array.push(line) >> } >> >> Are there other ways shorter than above ? >> For example: books_array = File.open('books_file.txt').to_array() > > > a = IO::read 'books_file.txt' > > -a you just misspelled 'readlines', right? :) cheers Simon