G
gabriele renzi
as in the subject, I just noticed that readlines just accepts a string
as line Separator, and I wonder why it works this way.
Some explanations?
BTW, if I want to read a file in a array of 'words' I have to do :
File.new('myfile').gets(nil).split
no better way ?
on a sidenote, what are the efficiency issue related to the use of
IO#each vs IO#foreach(anIO) vs a simple 'while line=gets..' ?
as line Separator, and I wonder why it works this way.
Some explanations?
BTW, if I want to read a file in a array of 'words' I have to do :
File.new('myfile').gets(nil).split
no better way ?
on a sidenote, what are the efficiency issue related to the use of
IO#each vs IO#foreach(anIO) vs a simple 'while line=gets..' ?