mach-o: use any? instead of map and include?

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
Jack Nagel 2012-08-21 13:45:35 -05:00
parent abf55c2bcd
commit e2058ed362

View File

@ -100,14 +100,14 @@ module MachO
end end
def dylib? def dylib?
mach_data.map{ |m| m.fetch :type }.include? :dylib mach_data.any? { |m| m.fetch(:type) == :dylib }
end end
def mach_o_executable? def mach_o_executable?
mach_data.map{ |m| m.fetch :type }.include? :executable mach_data.any? { |m| m.fetch(:type) == :executable }
end end
def mach_o_bundle? def mach_o_bundle?
mach_data.map{ |m| m.fetch :type }.include? :bundle mach_data.any? { |m| m.fetch(:type) == :bundle }
end end
end end