Drop intermediate variable

This commit is contained in:
Jack Nagel 2014-03-26 16:07:49 -05:00
parent 91d31ae1f4
commit 4fe0be37c0

View File

@ -10,8 +10,7 @@ module Utils
yield s
else
after = after.to_s if Symbol === after
sub = s.gsub!(before, after)
if sub.nil?
unless s.gsub!(before, after)
message = <<-EOS.undent
inreplace in '#{path}' failed
Expected replacement of '#{before}' with '#{after}'