Commit f2b8f357 authored by Stan Hu's avatar Stan Hu

Merge branch 'fix-diverging-counts-ruby2.5' into 'master'

(Really) Fix Ruby 2.5 compatibility for diverging counts of branches

Closes #64143

See merge request gitlab-org/gitlab-ce!31491
parents 8adcc599 33e10d70
......@@ -49,7 +49,7 @@ class Projects::BranchesController < Projects::ApplicationController
branches = BranchesFinder.new(repository, params.permit(names: [])).execute
Gitlab::GitalyClient.allow_n_plus_1_calls do
render json: branches.to_h { |branch| [branch.name, service.call(branch)] }
render json: branches.map { |branch| [branch.name, service.call(branch)] }.to_h
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment