Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab/discussions_diff/file_collection.rb')
-rw-r--r--lib/gitlab/discussions_diff/file_collection.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/discussions_diff/file_collection.rb b/lib/gitlab/discussions_diff/file_collection.rb
index 7a9d4c5c0c2..60b3a1738f1 100644
--- a/lib/gitlab/discussions_diff/file_collection.rb
+++ b/lib/gitlab/discussions_diff/file_collection.rb
@@ -70,8 +70,8 @@ module Gitlab
#
# Returns a Hash with { id => [Array of Gitlab::Diff::line], ...]
def highlighted_lines_by_ids(ids)
- diff_files_indexed_by_id.slice(*ids).each_with_object({}) do |(id, file), hash|
- hash[id] = file.highlighted_diff_lines.map(&:to_hash)
+ diff_files_indexed_by_id.slice(*ids).transform_values do |file|
+ file.highlighted_diff_lines.map(&:to_hash)
end
end
end