Andre Nathan wrote: >>> a = [] >>> > => [] > >>> a.all? >>> > => true > >>> a.all? { |i| i == 10 } >>> > => true > > Is there any reasoning for Enumerable#all? to always return true for > empty arrays? > I think they are modeled after universal and existential quantifiers in predicate calculus: a.all?(&b) is true iff for all x in a b[x]. This leads to a.all? being true. a.any?(&b) is true iff there exists an x in a for which b[x]. This leads to a.any? being false. -- Florian Frank