Project

General

Profile

Actions

Misc #13840

closed

Collection methods - stability

Added by MSP-Greg (Greg L) over 6 years ago. Updated over 6 years ago.

Status:
Rejected
Assignee:
-
[ruby-core:82481]

Description

I'm trying to fix some method code (Gem::Resolver#search_for) in rubygems.

Regardless, in simplifying the code, I was left with one question regarding all of the sort/filter group methods in ruby.

Which ones are considered stable, or, is original order maintained where applicable?

Obviously, this pertains to sort and sort_by, but also has meaning in group_by, select, reject, and similar methods.

I'm not proposing one or another, although I'd prefer stable. Docs for all these methods should note this, and if stability is guaranteed, tests should verify it. Happy to help.

As an aside, Gem::Resolver#search_for exists in both ruby and rubygems, but is different. Also, a test for it exists in rubygems, but not in ruby. Seems odd.

Actions

Also available in: Atom PDF

Like0
Like0Like0