diff options
author | Stan Hu <stanhu@gmail.com> | 2019-08-06 03:38:06 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-06 03:38:06 +0300 |
commit | f2b8f3579b93a76bdcb91caa18bfb9257e8c341f (patch) | |
tree | 654890216c0dac0204e9b4cc9f3ca7ace9a18b67 | |
parent | 8adcc5993ddcb16ac29dac39c9063e2d0ca99bbe (diff) | |
parent | 33e10d700fe0fd2884465aea615aea85abdd0be1 (diff) |
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.rb | 2 |
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 |