summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.rubocop.yml3
-rw-r--r--lib/gitlab/bitbucket_import/client.rb2
2 files changed, 2 insertions, 3 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 0946ef5d848..26929e03456 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -957,10 +957,9 @@ Performance/EndWith:
Performance/LstripRstrip:
Enabled: true
-# TODO: Enable RangeInclude Cop.
# Use `Range#cover?` instead of `Range#include?`.
Performance/RangeInclude:
- Enabled: false
+ Enabled: true
# TODO: Enable RedundantBlockCall Cop.
# Use `yield` instead of `block.call`.
diff --git a/lib/gitlab/bitbucket_import/client.rb b/lib/gitlab/bitbucket_import/client.rb
index 9b83292ef33..8d1ad62fae0 100644
--- a/lib/gitlab/bitbucket_import/client.rb
+++ b/lib/gitlab/bitbucket_import/client.rb
@@ -121,7 +121,7 @@ module Gitlab
def get(url)
response = api.get(url)
- raise Unauthorized if (400..499).include?(response.code.to_i)
+ raise Unauthorized if (400..499).cover?(response.code.to_i)
response
end