- [Feature #15975] Add `Array#pluck`/`Enumerable#pluck` method - It pulls values out of an array of hashes (e.g. array of user hashes, `users.pluck(:username)` gets all their usernames) - Please reconsider adding the method. I've add...connorshea (Connor Shea)
I was going to suggest the same thing because I think it's a very useful shorthand! Here's an example I run into a lot when manipulating data in my Ruby scripts. ``` ruby # Lets say I have an array of hashes representing video games (th...connorshea (Connor Shea)
* [Feature #16456] Ruby 2.7 argument delegation (`...`) should be its own kind of parameter in `Method#parameters` (aaronc81) * Right now, the `parameters` method returns `[[:rest, :*], [:block, :&]]` if a method uses the `...` syntax...connorshea (Connor Shea)
I'd definitely like to see this as well. It'd be useful for Sorbet since it uses the parameters method to reconstruct methods when generating scaffolds for gem methods and other Ruby code. https://github.com/sorbet/sorbet/blob/29a967a...connorshea (Connor Shea)
* [Feature #16155] Add an `Array#intersection` method * Is this an acceptable method name? * Should this be a simple alias for `Array#&`, or should it accept multiple arrays as arguments, like `difference` and `union` do?connorshea (Connor Shea)
shevegen (Robert A. Heiler) wrote: > You could consider adding this to the upcoming developer meeting: > ... Thanks, I will :) After thinking about the proposal a bit more, one other thing I wanted to ask was about whether we should...connorshea (Connor Shea)
`Array#union` and `Array#difference` were added in Ruby 2.6 ([see this bug](https://bugs.ruby-lang.org/issues/14097)), but an equivalent for `&` (intersection) was not. I'd like to propose `Array#intersection`. This would essentially ...connorshea (Connor Shea)