Fix Style/SlicingWithRange cop (#25923)
This commit is contained in:
parent
658742b3cd
commit
b8b2470cf8
12 changed files with 13 additions and 28 deletions
|
|
@ -29,7 +29,7 @@ module ActiveRecord
|
|||
if flatten
|
||||
yield record[1]
|
||||
else
|
||||
yield record[1..-1]
|
||||
yield record[1..]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ module PremailerWebpackStrategy
|
|||
css = if url.start_with?('http')
|
||||
HTTP.get(url).to_s
|
||||
else
|
||||
url = url[1..-1] if url.start_with?('/')
|
||||
url = url[1..] if url.start_with?('/')
|
||||
Rails.public_path.join(url).read
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace :repo do
|
|||
file.each_line do |line|
|
||||
if line.start_with?('-')
|
||||
new_line = line.gsub(/#([[:digit:]]+)*/) do |pull_request_reference|
|
||||
pull_request_number = pull_request_reference[1..-1]
|
||||
pull_request_number = pull_request_reference[1..]
|
||||
response = nil
|
||||
|
||||
loop do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue