Use sum, feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6084#note_14991392
This commit is contained in:
parent
413516081b
commit
b92c75ab98
|
@ -133,9 +133,7 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
def process_duration(periods)
|
def process_duration(periods)
|
||||||
periods.inject(0) do |result, per|
|
periods.sum(&:duration)
|
||||||
result + per.duration
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue