Commit f9c9daac authored by Shinya Maeda's avatar Shinya Maeda

Resolve static analysys. Use until instead of negative while

parent cf4ab10d
...@@ -99,7 +99,7 @@ module Gitlab ...@@ -99,7 +99,7 @@ module Gitlab
stream.seek(0, IO::SEEK_END) stream.seek(0, IO::SEEK_END)
debris = '' debris = ''
while !(buf = read_backward(BUFFER_SIZE)).empty? until (buf = read_backward(BUFFER_SIZE)).empty?
buf += debris buf += debris
debris, *lines = buf.each_line.to_a debris, *lines = buf.each_line.to_a
lines.reverse_each do |line| lines.reverse_each do |line|
...@@ -107,7 +107,7 @@ module Gitlab ...@@ -107,7 +107,7 @@ module Gitlab
end end
end end
yield(debris.force_encoding('UTF-8')) if !(debris).empty? yield(debris.force_encoding('UTF-8')) unless debris.empty?
end end
def read_backward(length) def read_backward(length)
......
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