From: Florian Frank Date: 2004-09-01T09:35:22+09:00 Subject: Re: Problem with File::Tail (no new lines getting processed) On 2004-09-01 06:08:57 +0900, Josh Endries wrote: > having trouble tailing the file, though. When I start the program it > spits out the entire file (unless I have rewind in the open() call), > then sits there "tailing" but no new lines get displayed. Normal > `tail` works from the console... This is all on a FreeBSD 4.10 system. I could confirm this behaviour on a local FreeBSD installation. I think you found a bug: If EOFError occurs on FreeBSD the tailed file handle is tagged with an error flag. So further reading isn't possible before calling clearerr on it. Because I cannot do this directly from Ruby I just used the seek method to clearerr as a side effect. This seemed rather hackish to me: Perhaps it would be better to use a dedicated method for this. Or should Ruby take care of clearing the handle after an EOFError occurs, so users don't have to? I am not quite sure... Could you try this hotfixed version? http://www.ping.de/~flori/programs/ruby/file-tail/file-tail-0.1.1.tgz -- lambda { |c| lambda { |f| f[f] } [ lambda { |f| c[lambda { |x| f[f][x] } ] }] }