diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 113c0bad39b0c5dd3d914fb2d34b04ffb056830d..32cd4e2c6be67510357303091b3ab020b9046f01 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -484,7 +484,7 @@ module Homebrew update_or_add = "update" if args.keep_old? mismatches = [] - bottle_block_contents = s[/ bottle do(.+?)end\n/m, 1] + bottle_block_contents = s.inreplace_string[/ bottle do(.+?)end\n/m, 1] bottle_block_contents.lines.each do |line| line = line.strip next if line.empty?