mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05: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:
parent
2c8a4a53a8
commit
1466f312ba
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue