mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
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:
committed by
José Valim
parent
2c8a4a53a8
commit
1466f312ba
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user