Fix Performance/StartWith cop (#24818)
This commit is contained in:
parent
9a472efe7c
commit
0664704cd9
2 changed files with 1 additions and 7 deletions
|
@ -64,7 +64,7 @@ module Extractor
|
|||
end_position = match_data.char_end(1)
|
||||
after = ::Regexp.last_match.post_match
|
||||
|
||||
if %r{\A://}.match?(after)
|
||||
if after.start_with?('://')
|
||||
hash_text.match(/(.+)(https?\Z)/) do |matched|
|
||||
hash_text = matched[1]
|
||||
end_position -= matched[2].codepoint_length
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue