Fix stupid mistake in 6ff61909a91edf3f31adc608dcafd3f5f8e642d0

I forgot to alter the call to gsub() when breaking up the unless to shorten
the line.
This commit is contained in:
David Griffith 2019-10-21 17:46:50 -07:00
parent 0a175c4feb
commit 5b58931ebd

View File

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