aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd
diff options
context:
space:
mode:
authorMarkus Reiter2016-09-27 19:11:56 +0200
committerMarkus Reiter2016-09-29 22:58:41 +0200
commit5b2ae6885b787a2695494a16140c47f6f9175189 (patch)
tree7600f5dbd92958f8c31a9e9bddf33650118cd2ee /Library/Homebrew/dev-cmd
parent70fc82578795a3c99fb149615e2efbf4596ea4a4 (diff)
downloadbrew-5b2ae6885b787a2695494a16140c47f6f9175189.tar.bz2
Fix Lint/NestedMethodDefinition` in `dev-cmd/bottle.rb`.
Diffstat (limited to 'Library/Homebrew/dev-cmd')
-rw-r--r--Library/Homebrew/dev-cmd/bottle.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb
index b2aa3b2c5..83e40f25d 100644
--- a/Library/Homebrew/dev-cmd/bottle.rb
+++ b/Library/Homebrew/dev-cmd/bottle.rb
@@ -44,9 +44,9 @@ module Homebrew
def keg_contain?(string, keg, ignores)
@put_string_exists_header, @put_filenames = nil
- def print_filename(string, filename)
+ print_filename = lambda do |str, filename|
unless @put_string_exists_header
- opoo "String '#{string}' still exists in these files:"
+ opoo "String '#{str}' still exists in these files:"
@put_string_exists_header = true
end
@@ -68,7 +68,7 @@ module Homebrew
result ||= !linked_libraries.empty?
if ARGV.verbose?
- print_filename(string, file) unless linked_libraries.empty?
+ print_filename.call(string, file) unless linked_libraries.empty?
linked_libraries.each do |lib|
puts " #{Tty.gray}-->#{Tty.reset} links to #{lib}"
end
@@ -91,7 +91,7 @@ module Homebrew
end
next unless ARGV.verbose? && !text_matches.empty?
- print_filename string, file
+ print_filename.call(string, file)
text_matches.first(MAXIMUM_STRING_MATCHES).each do |match, offset|
puts " #{Tty.gray}-->#{Tty.reset} match '#{match}' at offset #{Tty.em}0x#{offset}#{Tty.reset}"
end