aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/patch.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-10-08 20:38:32 +0200
committerGitHub2017-10-08 20:38:32 +0200
commitb806a53d88938ab2d2aeb5e96651ed6d47efcdf9 (patch)
tree067464b4c08f4c16ca3439b533f06669a78c370c /Library/Homebrew/patch.rb
parent91ab116ace7f4f97d3440190463c93be9ec6d675 (diff)
parent175ca909ee1a5b57aa0cae2c879920511f311b14 (diff)
downloadbrew-b806a53d88938ab2d2aeb5e96651ed6d47efcdf9.tar.bz2
Merge pull request #3278 from reitermarkus/code-style
Clean up code style and remove `.rubocop_todo.yml`.
Diffstat (limited to 'Library/Homebrew/patch.rb')
-rw-r--r--Library/Homebrew/patch.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/Library/Homebrew/patch.rb b/Library/Homebrew/patch.rb
index 7045adf5e..8a1b00930 100644
--- a/Library/Homebrew/patch.rb
+++ b/Library/Homebrew/patch.rb
@@ -60,8 +60,7 @@ class EmbeddedPatch
false
end
- def contents
- end
+ def contents; end
def apply
data = contents.gsub("HOMEBREW_PREFIX", HOMEBREW_PREFIX)
@@ -87,10 +86,13 @@ class DATAPatch < EmbeddedPatch
def contents
data = ""
path.open("rb") do |f|
- begin
+ loop do
line = f.gets
- end until line.nil? || line =~ /^__END__$/
- data << line while line = f.gets
+ break if line.nil? || line =~ /^__END__$/
+ end
+ while line = f.gets
+ data << line
+ end
end
data
end