From e2058ed362eefca0cdc9553a7f9e7a5bb83acc26 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 21 Aug 2012 13:45:35 -0500 Subject: [PATCH] mach-o: use any? instead of map and include? Signed-off-by: Jack Nagel --- Library/Homebrew/mach.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/mach.rb b/Library/Homebrew/mach.rb index 7b9d4d3457..d1f4540ecb 100644 --- a/Library/Homebrew/mach.rb +++ b/Library/Homebrew/mach.rb @@ -100,14 +100,14 @@ module MachO end def dylib? - mach_data.map{ |m| m.fetch :type }.include? :dylib + mach_data.any? { |m| m.fetch(:type) == :dylib } end def mach_o_executable? - mach_data.map{ |m| m.fetch :type }.include? :executable + mach_data.any? { |m| m.fetch(:type) == :executable } end def mach_o_bundle? - mach_data.map{ |m| m.fetch :type }.include? :bundle + mach_data.any? { |m| m.fetch(:type) == :bundle } end end