summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-04-03 16:47:18 +0000
committerRémy Coutable <remy@rymai.me>2017-04-03 16:47:18 +0000
commitca6a7f1e9c9296317315249de9b8b3803d1c6ddc (patch)
tree3f4c8c39b4586a480e8989648ecf7d9525acf683 /lib
parentb2700e64cce7c9b258e117a995eda8de00a8a988 (diff)
parent0a09925dcef1976970bc2674432f69d46786c38f (diff)
downloadgitlab-ce-ca6a7f1e9c9296317315249de9b8b3803d1c6ddc.tar.gz
Merge branch 'style-proc-cop' into 'master'
Enable Style/Proc cop for rubocop See merge request !10382
Diffstat (limited to 'lib')
-rw-r--r--lib/api/api_guard.rb2
-rw-r--r--lib/gitlab/ldap/config.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/api_guard.rb b/lib/api/api_guard.rb
index 409cb5b924f..9fcf04efa38 100644
--- a/lib/api/api_guard.rb
+++ b/lib/api/api_guard.rb
@@ -121,7 +121,7 @@ module API
end
def oauth2_bearer_token_error_handler
- Proc.new do |e|
+ proc do |e|
response =
case e
when MissingTokenError
diff --git a/lib/gitlab/ldap/config.rb b/lib/gitlab/ldap/config.rb
index 28129198438..46deea3cc9f 100644
--- a/lib/gitlab/ldap/config.rb
+++ b/lib/gitlab/ldap/config.rb
@@ -124,9 +124,9 @@ module Gitlab
def name_proc
if allow_username_or_email_login
- Proc.new { |name| name.gsub(/@.*\z/, '') }
+ proc { |name| name.gsub(/@.*\z/, '') }
else
- Proc.new { |name| name }
+ proc { |name| name }
end
end