aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_cellar_checks.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb
index b1b52b28a..a37e6a2d2 100644
--- a/Library/Homebrew/formula_cellar_checks.rb
+++ b/Library/Homebrew/formula_cellar_checks.rb
@@ -40,8 +40,7 @@ module FormulaCellarChecks
def check_jars
return unless f.lib.directory?
-
- jars = f.lib.children.select{|g| g.to_s =~ /\.jar$/}
+ jars = f.lib.children.select { |g| g.extname == ".jar" }
return if jars.empty?
["JARs were installed to \"#{f.lib}\".",
@@ -92,7 +91,8 @@ module FormulaCellarChecks
def check_generic_executables bin
return unless bin.directory?
- generics = bin.children.select { |g| g.to_s =~ /\/(run|service)$/}
+ generic_names = %w[run service]
+ generics = bin.children.select { |g| generic_names.include? g.basename.to_s }
return if generics.empty?
["Generic binaries were installed to \"#{bin}\".",