Project

General

Profile

Actions

Feature #10506

closed

Imprve Enumerator.any? behavior

Added by thomas.sevestre (Thomas Sevestre) over 9 years ago. Updated over 9 years ago.

Status:
Rejected
Target version:
[ruby-core:66260]

Description

IMHO the API Enumerable.any? behavior could be improved in the following manner:

any? { |obj| block } → true or false
any? → an_enumerator 

This would allow to do things like

[].any?.with_index { |obj, index| }

And it would be more consistent with collect and other Enumerable functions:

collect { |obj| block } → array
collect → an_enumerator
Actions

Also available in: Atom PDF

Like0
Like0Like0