mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-21 18:46:10 +10:00
Merge branch 'rs-range-include' into 'master'
Enable Performance/RangeInclude cop and fix single offense Ref: https://gitlab.com/gitlab-org/gitlab-ce/issues/17478 See merge request !4255
This commit is contained in:
+1
-2
@@ -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`.
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user