Project

General

Profile

Feature #16118

Array .difference allow custom comparison

Added by ngomez (Nancy Gomez) 4 months ago. Updated 4 months ago.

Status:
Open
Priority:
Normal
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 :)

History

#1

Updated by ngomez (Nancy Gomez) 4 months ago

  • Subject changed from Array .distance allow custom comparison to Array .difference allow custom comparison

Also available in: Atom PDF