extend/string: use unless to fix style.

This commit is contained in:
Mike McQuaid 2019-10-22 08:24:32 +01:00
parent 11f322b61c
commit d15edf735a
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -50,7 +50,7 @@ module StringInreplaceExtension
def remove_make_var!(flags)
Array(flags).each do |flag|
# Also remove trailing \n, if present.
if !gsub!(/^#{Regexp.escape(flag)}[ \t]*[\\?\+\:\!]?=.*$\n?/, "", false)
unless gsub!(/^#{Regexp.escape(flag)}[ \t]*[\\?\+\:\!]?=.*$\n?/, "", false)
errors << "expected to remove #{flag.inspect}"
end
end