summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-08-09 12:38:07 +0200
committerJacob Vosmaer <jacob@gitlab.com>2017-08-09 12:38:07 +0200
commit4950c3ca5f4dd5f3e4e8f2a60d672d41c3f2226b (patch)
treebebeb15eb93ee2fbfca39ee0f05b6adbf905101d
parentc7a4e48d058cab1eb781027164edb3514941a2b3 (diff)
downloadgitlab-ce-gitlab-git-local.tar.gz
Remove activesupport dependencygitlab-git-local
-rw-r--r--lib/gitlab/git/local/repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/git/local/repository.rb b/lib/gitlab/git/local/repository.rb
index 2a30c830577..315908d167e 100644
--- a/lib/gitlab/git/local/repository.rb
+++ b/lib/gitlab/git/local/repository.rb
@@ -5,7 +5,7 @@ module Gitlab
def local_languages(ref)
ref ||= rugged.head.target_id
languages = Linguist::Repository.new(rugged, ref).languages
- total = languages.map(&:last).sum
+ total = languages.inject(0) { |sum, (_, count)| sum + count }
languages = languages.map do |language|
name, share = language