much better

This commit is contained in:
Shinya Maeda 2017-05-17 18:26:38 +09:00
parent dddfa28eec
commit 6be609dd64
1 changed files with 1 additions and 7 deletions

View File

@ -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