Actions
Feature #8825
closedSymbol Argument to any?
Status:
Rejected
Assignee:
-
Target version:
-
Description
It would be nice if any?
could take a symbol much like map
. For example:
foo.any?(&:bar)
Updated by nobu (Nobuyoshi Nakada) about 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) about 11 years ago
Yes. That's what I was thinking.
Updated by Anonymous about 11 years ago
- Status changed from Feedback to Rejected
=begin
This already works:
[1,2,3].any?(&:even?)
=end
Actions
Like0
Like0Like0Like0