Enable Performance/RangeInclude cop and fix single offense

This commit is contained in:
Robert Speicher 2016-05-23 13:10:42 -04:00
parent bc806831e8
commit 51c167eeb7
2 changed files with 2 additions and 3 deletions

View File

@ -957,10 +957,9 @@ Performance/EndWith:
Performance/LstripRstrip: Performance/LstripRstrip:
Enabled: true Enabled: true
# TODO: Enable RangeInclude Cop.
# Use `Range#cover?` instead of `Range#include?`. # Use `Range#cover?` instead of `Range#include?`.
Performance/RangeInclude: Performance/RangeInclude:
Enabled: false Enabled: true
# TODO: Enable RedundantBlockCall Cop. # TODO: Enable RedundantBlockCall Cop.
# Use `yield` instead of `block.call`. # Use `yield` instead of `block.call`.

View File

@ -121,7 +121,7 @@ module Gitlab
def get(url) def get(url)
response = api.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 response
end end