diff options
author | Curtis Cablegram <cablegram@comcast.net> | 2010-07-28 19:34:04 -0500 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-08-03 10:50:21 +0200 |
commit | 1466f312bad35809fa9fe343068d2fc8a814ffe6 (patch) | |
tree | 200ca8c951cd3c3a747edb34e43facd7554f7d10 /railties/lib/rails | |
parent | 2c8a4a53a8c38a43a62342b9d46014242e781d18 (diff) | |
download | rails-1466f312bad35809fa9fe343068d2fc8a814ffe6.tar.gz rails-1466f312bad35809fa9fe343068d2fc8a814ffe6.tar.bz2 rails-1466f312bad35809fa9fe343068d2fc8a814ffe6.zip |
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>
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/rack/log_tailer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/rack/log_tailer.rb b/railties/lib/rails/rack/log_tailer.rb index 3fa45156c3..2ca6b5f8da 100644 --- a/railties/lib/rails/rack/log_tailer.rb +++ b/railties/lib/rails/rack/log_tailer.rb @@ -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 |