Append gurad clause. remove unless debris.empty

This commit is contained in:
Shinya Maeda 2017-05-18 01:59:04 +09:00
parent 72b0af2c4c
commit 22f1d2a1c4
1 changed files with 3 additions and 1 deletions

View File

@ -96,6 +96,8 @@ module Gitlab
end
def reverse_line
return if stream.size <= 0
pos = 0
max = stream.size
debris = ''
@ -110,7 +112,7 @@ module Gitlab
end
end
yield(debris) unless debris.empty?
yield(debris)
end
def calc_read_size(pos, max)