Drop intermediate variable
This commit is contained in:
parent
91d31ae1f4
commit
4fe0be37c0
@ -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}'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user