Project

General

Profile

Actions

Feature #8825

closed

Symbol Argument to any?

Added by kyledecot (Kyle Decot) over 11 years ago. Updated over 11 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:56833]

Description

It would be nice if any? could take a symbol much like map. For example:

foo.any?(&:bar)

Updated by nobu (Nobuyoshi Nakada) over 11 years ago

  • Status changed from Open to Feedback

=begin
Do you mean it is same as this?

foo.any? {|e| e.bar}
=end

Updated by kyledecot (Kyle Decot) over 11 years ago

Yes. That's what I was thinking.

Updated by Anonymous over 11 years ago

  • Status changed from Feedback to Rejected

=begin
This already works:

[1,2,3].any?(&:even?)

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0