Project

General

Profile

Bug #9022

all? method in empty array should return false

Added by Lucas Caton almost 3 years ago. Updated almost 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
ruby -v:
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]
[ruby-core:57860]

Description

This is expected:

[].any?(&:whatever?)

=> false

But this is not the behavior which I expect:

[].all?(&:whatever?)

=> true

Do you agree with me?


Related issues

Duplicates CommonRuby - Feature #8723: Array.any? predicate returns true for empty array. Rejected 08/02/2013

History

#1 [ruby-core:57861] Updated by Matthew Kerwin almost 3 years ago

This is a duplicate of #8723

#2 [ruby-core:57865] Updated by Nobuyoshi Nakada almost 3 years ago

  • Status changed from Open to Rejected

#3 [ruby-core:57872] Updated by Alexey Muranov almost 3 years ago

Since commenting on the other thread, i have leant that the proposed interpretation of the "for all" quantifier is apparently called "existential import" and apparently was a matter of debate in the 19th century (http://en.wikipedia.org/wiki/Syllogism#Existential_import for example).

Also available in: Atom PDF