Bug #9022

all? method in empty array should return false

Added by Lucas Caton about 2 years ago. Updated about 2 years ago.

ruby -v:ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0] Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN


This is expected:


=> false

But this is not the behavior which I expect:


=> true

Do you agree with me?

Related issues

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


#1 Updated by Matthew Kerwin about 2 years ago

This is a duplicate of #8723

#2 Updated by Nobuyoshi Nakada about 2 years ago

  • Status changed from Open to Rejected

#3 Updated by Alexey Muranov about 2 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