diff options
author | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-17 19:59:04 +0300 |
---|---|---|
committer | Shinya Maeda <gitlab.shinyamaeda@gmail.com> | 2017-05-24 14:10:14 +0300 |
commit | 22f1d2a1c46ce9eb2835611c4eac6948bd983488 (patch) | |
tree | f32d09ed3bc0c90d2d049bbae818013d2d4386f1 /lib | |
parent | 72b0af2c4cefea51c521d3606a0a3307aee41348 (diff) |
Append gurad clause. remove unless debris.empty
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/trace/stream.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/ci/trace/stream.rb b/lib/gitlab/ci/trace/stream.rb index d64c43df1d5..c2abe37f003 100644 --- a/lib/gitlab/ci/trace/stream.rb +++ b/lib/gitlab/ci/trace/stream.rb @@ -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) |