Project

General

Profile

Actions

Feature #21678

closed

Enumerable#rfind

Feature #21678: Enumerable#rfind

Added by kddnewton (Kevin Newton) about 1 month ago. Updated 9 days ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:123754]

Description

I'd like to introduce rfind to enumerable, which would effectively be the same as reverse_each.find. I've found myself using this a surprising number of times, and have been surprised at its omission. That means either falling back to reverse_each or rindex.

For context, here are a couple of examples of this in the wild:

Actions

Also available in: PDF Atom