Project

General

Profile

Actions

Feature #21678

open

Enumerable#rfind

Feature #21678: Enumerable#rfind

Added by kddnewton (Kevin Newton) 1 day ago. Updated about 3 hours ago.

Status:
Open
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