Change log-tailer to properly track multi-byte characters.

When end-of-line is represented within a file as "\r\n",
it is represented in memory as a single "\n".  This patch eliminates
the discrepancy between size on disk and size in memory.

Signed-off-by: José Valim <jose.valim@gmail.com>
This commit is contained in:
Curtis Cablegram
2010-07-28 19:34:04 -05:00
committed by José Valim
parent 2c8a4a53a8
commit 1466f312ba

View File

@@ -24,7 +24,7 @@ module Rails
if mod > @last_checked
contents = @file.read
@last_checked = mod
@cursor += contents.size
@cursor = @file.tell
$stdout.print contents
end
end