Project

General

Profile

Actions

Bug #9022

closed

all? method in empty array should return false

Added by lucascaton (Lucas Caton) about 11 years ago. Updated about 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
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 1 (0 open1 closed)

Is duplicate of Ruby master - Feature #8723: Array.any? predicate returns true for empty array.RejectedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0