Project

General

Profile

Actions

Feature #16118

open

Array .difference allow custom comparison

Added by ngomez (Nancy Gomez) over 5 years ago. Updated almost 3 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:94486]

Description

Hello!

I wanted to know if there's any plan to implement the ability to define comparison between individual items in arrays.

Here is where I originally asked the question on Stack Overflow: https://stackoverflow.com/questions/57316775/is-there-any-way-to-specify-how-to-compare-of-array-of-objects-for-difference-f

But specifically, I noticed nearly all the existing Array functions allow us to define ways for comparison, such as #uniq but #difference does not :( This is quite unfortunate but I'm hoping it's just because this function was introduced in 2.6.0, and hopefully this feature can be implemented?

Thanks for any and all info :)

Actions

Also available in: Atom PDF

Like0
Like0Like0