Use force_encoding(regex.encoding)
This commit is contained in:
parent
a6f6056c62
commit
318b464072
1 changed files with 2 additions and 2 deletions
|
@ -74,7 +74,7 @@ module Gitlab
|
|||
match = ""
|
||||
|
||||
reverse_line do |line|
|
||||
matches = line.force_encoding(Encoding.default_external).scan(regex)
|
||||
matches = line.force_encoding(regex.encoding).scan(regex)
|
||||
next unless matches.is_a?(Array)
|
||||
next if matches.empty?
|
||||
|
||||
|
@ -86,7 +86,7 @@ module Gitlab
|
|||
nil
|
||||
rescue
|
||||
# if bad regex or something goes wrong we dont want to interrupt transition
|
||||
# so we just silentrly ignore error for now
|
||||
# so we just silently ignore error for now
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue