From: Mike McKinney Date: 2007-12-14T03:16:51+09:00 Subject: Re: read in file ------=_Part_43286_2222848.1197569810710 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline very good point! On Dec 13, 2007 10:27 AM, Sebastian Hungerecker wrote: > Mike McKinney wrote: > > File.open('out.txt', 'w') do |out| > > File.open('test.txt', 'r').each do |line| > > out.puts line if (line.size > 4) > > end > > end > > That leaves test.txt open which is not good. Don't use File.open in chains > like that. Or better yet: Don't use File.open without a block at all. > > HTH, > Sebastian > -- > NP: Katatonia - Day > Jabber: sepp2k@jabber.org > ICQ: 205544826 > > ------=_Part_43286_2222848.1197569810710--