General

Profile

alex_golubenko (Alex Golubenko)

  • Login: alex_golubenko
  • Registered on: 02/29/2020
  • Last sign in: 02/29/2020

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 0 1

Activity

03/13/2020

08:26 PM Ruby Feature #16665: Add an Array#except_index method
Dan0042 (Daniel DeLorme) wrote in #note-9:
> That implementation would return an empty array for `[true,nil,nil].except_index(0)`
> ...
Sure, the final implementation was:
``` ruby
def except_index(*indicies)
to_delete = Arr...
alex_golubenko (Alex Golubenko)

03/02/2020

07:19 PM Ruby Feature #16665: Add an Array#except_index method
sawa (Tsuyoshi Sawada) wrote in #note-2:
> For the positive counterpart, we have `Array#values_at`. I think the method name to be proposed should be somehow aligned with that.
May I ask you to check my answer to Robert A. Heiler?
alex_golubenko (Alex Golubenko)
07:18 PM Ruby Feature #16665: Add an Array#except_index method
shevegen (Robert A. Heiler) wrote in #note-1:
> I can not comment on how useful this may be; I think I may have added something similar
> ...
I also thought a lot about naming and have a few variants:
``` ruby
omit_indices
omit_in...
alex_golubenko (Alex Golubenko)

02/29/2020

02:46 PM Ruby Feature #16665 (Open): Add an Array#except_index method
The main idea is to implement a method that we can use to exclude elements from the array by their indices.
For example:
``` ruby
%w( a b c d e f).except_index(0, -1)
=> ["b", "c", "d", "e"]
%w( a b c d e f g h ).except_index...
alex_golubenko (Alex Golubenko)

Also available in: Atom