aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/patch.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-10-07 00:31:28 +0200
committerMarkus Reiter2017-10-08 16:10:37 +0200
commit175ca909ee1a5b57aa0cae2c879920511f311b14 (patch)
tree067464b4c08f4c16ca3439b533f06669a78c370c /Library/Homebrew/patch.rb
parent91ab116ace7f4f97d3440190463c93be9ec6d675 (diff)
downloadbrew-175ca909ee1a5b57aa0cae2c879920511f311b14.tar.bz2
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