summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-05-30 17:20:56 +0000
committerRobert Speicher <robert@gitlab.com>2016-05-30 17:20:56 +0000
commit6eaf327a57149739fb6b14e2396181cc95e687ff (patch)
treefc0cb72be5cbcc75a55ebe5f6329f112cadcb7fc /lib
parenta1565182e9d0c404f2bd18d960a282e02f650fea (diff)
parentc370dce01c95ff3d2cf102f4bdcf8347e3764893 (diff)
downloadgitlab-ce-6eaf327a57149739fb6b14e2396181cc95e687ff.tar.gz
Merge branch 'rubocop/enable-redundant-parentheses-cop' into 'master'
Enable Style/RedundantParentheses rubocop cop Checks for parentheses that seem not to serve any purpose. See #17478 See merge request !4361
Diffstat (limited to 'lib')
-rw-r--r--lib/api/users.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/users.rb b/lib/api/users.rb
index ea6fa2dc8a8..8a376d3c2a3 100644
--- a/lib/api/users.rb
+++ b/lib/api/users.rb
@@ -76,7 +76,7 @@ module API
required_attributes! [:email, :password, :name, :username]
attrs = attributes_for_keys [:email, :name, :password, :skype, :linkedin, :twitter, :projects_limit, :username, :bio, :location, :can_create_group, :admin, :confirm, :external]
admin = attrs.delete(:admin)
- confirm = !(attrs.delete(:confirm) =~ (/(false|f|no|0)$/i))
+ confirm = !(attrs.delete(:confirm) =~ /(false|f|no|0)$/i)
user = User.build_user(attrs)
user.admin = admin unless admin.nil?
user.skip_confirmation! unless confirm