Skip to content
Snippets Groups Projects
Commit 9fd5953e authored by Jack Nagel's avatar Jack Nagel
Browse files

Make this more idiomatic

parent 2ef79d13
No related branches found
No related tags found
No related merge requests found
......@@ -55,9 +55,7 @@ module StringInreplaceExtension
# Removes variable assignments completely.
def remove_make_var! flags
# Next line is for Ruby 1.9.x compatibility
flags = [flags] unless flags.kind_of? Array
flags.each do |flag|
Array(flags).each do |flag|
# Also remove trailing \n, if present.
sub = gsub! Regexp.new("^#{flag}[ \\t]*=(.*)$\n?"), "", false
opoo "inreplace: removing '#{flag}' failed" if sub.nil?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment