Commit a1638748 authored by Shinya Maeda's avatar Shinya Maeda

put force_encoding in def reverse_line

parent 22f1d2a1
......@@ -74,7 +74,7 @@ module Gitlab
match = ""
reverse_line do |line|
matches = line.force_encoding(regex.encoding).scan(regex)
matches = line.scan(regex)
next unless matches.is_a?(Array)
next if matches.empty?
......@@ -108,11 +108,11 @@ module Gitlab
buf = stream.read(read_size) + debris
debris, *lines = buf.each_line.to_a
lines.reverse_each do |line|
yield(line)
yield(line.force_encoding('UTF-8'))
end
end
yield(debris)
yield(debris.force_encoding('UTF-8'))
end
def calc_read_size(pos, max)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment