Commit 6be609dd authored by Shinya Maeda's avatar Shinya Maeda

much better

parent dddfa28e
......@@ -92,13 +92,7 @@ module Gitlab
private
def read_last_lines(limit)
result = ''
reverse_line do |line|
result = line + result
limit -= 1
return result if limit <= 0
end
result
to_enum(:reverse_line).first(limit).reverse.join
end
def reverse_line
......
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