From: "Eregon (Benoit Daloze)" Date: 2013-08-03T00:40:42+09:00 Subject: [ruby-core:56339] [CommonRuby - Feature #8723][Rejected] Array.any? predicate returns true for empty array. Issue #8723 has been updated by Eregon (Benoit Daloze). Status changed from Feedback to Rejected One way to see it is enum.all? { |e| predicate(e) } == !enum.any? { |e| !predicate(e) } And it seems logical to have #any? be false when the array is empty, right? Also, enum.all? { |e| predicate(e) } == enum.none? { |e| !predicate(e) } If enum is empty, there is in fact *none* element which could not satisfy the predicate. And that also means *all* elements satisfy since there is no element which could possibly not satisfy it. Please comment if you find other interpretations supporting yours, but my guess is most language will satisfy these semantics. ---------------------------------------- Feature #8723: Array.any? predicate returns true for empty array. https://bugs.ruby-lang.org/issues/8723#change-40834 Author: nurettin (Nurettin Onur TUGCU) Status: Rejected Priority: Normal Assignee: Category: Target version: Are all your children redheaded? Would this be true if you have no children? I have no children, therefore none of my children are redheaded. Therefore [].any?{ true } == true makes no sense. Expected behavior: [].any?{ true } == false because the array is empty. -- http://bugs.ruby-lang.org/