From: "nurettin (Nurettin Onur TUGCU)" Date: 2013-08-03T19:59:24+09:00 Subject: [ruby-core:56353] [CommonRuby - Feature #8723] Array.any? predicate returns true for empty array. Issue #8723 has been updated by nurettin (Nurettin Onur TUGCU). ========= "Do you agree at least that you initial proposal with assigning false to [].all?{...} was unreasonable?" --alexeymuranov Well yes, I wanted it to return any false'y value, actually. Including nil. Sorry for not making it clear. ========= "They are true because a material conditional is defined to be true when the antecedent is false (or the conclusion is true)." -- http://en.m.wikipedia.org/wiki/Vacuous_truth OK I agree that the behavior is well-defined in mathematics now. Thanks for the effort everyone. My confusion arose from the fact that where the mathematical notation for all? would be: "for all x element of an sequence S where predicate Q is true, the result of all? is true" ���x(x ��� S -> Q) There were no x where predicate Q was true. However I see now that Vacuous Truth principle defines that case as well. So this makes "... but the results of these operations are not undefined." -- Martin Completely correct. I have no more issue with any? or all? ---------------------------------------- Feature #8723: Array.any? predicate returns true for empty array. https://bugs.ruby-lang.org/issues/8723#change-40848 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/