summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-08-06 00:38:06 +0000
committerStan Hu <stanhu@gmail.com>2019-08-06 00:38:06 +0000
commitf2b8f3579b93a76bdcb91caa18bfb9257e8c341f (patch)
tree654890216c0dac0204e9b4cc9f3ca7ace9a18b67
parent8adcc5993ddcb16ac29dac39c9063e2d0ca99bbe (diff)
parent33e10d700fe0fd2884465aea615aea85abdd0be1 (diff)
downloadgitlab-ce-f2b8f3579b93a76bdcb91caa18bfb9257e8c341f.tar.gz
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
-rw-r--r--app/controllers/projects/branches_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb
index 141a7dfb923..e7bdb4b2042 100644
--- a/app/controllers/projects/branches_controller.rb
+++ b/app/controllers/projects/branches_controller.rb
@@ -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