Sha256: 773dafa2d99fbb5316c7998d3f6ec677f06ca37e755ce3e6a4be87abda61c633
Contents?: true
Size: 325 Bytes
Versions: 6
Compression:
Stored size: 325 Bytes
Contents
unless Array.method_defined? :intersect? require 'backports/tools/arguments' class Array def intersect?(array) array = Backports.coerce_to_ary(array) if size < array.size smaller = self else smaller, array = array, self end (array & smaller).size > 0 end end end
Version data entries
6 entries across 6 versions & 1 rubygems