From: chad@... Date: 2017-01-11T00:40:12+00:00 Subject: [ruby-core:79040] [Ruby trunk Feature#13118] Array#at(*indexes); Array#at([indexes]) Issue #13118 has been updated by Chad Brewbaker. Well, I am an idiot. Read through the array spec twice and missed it both times. Please close. ---------------------------------------- Feature #13118: Array#at(*indexes); Array#at([indexes]) https://bugs.ruby-lang.org/issues/13118#change-62446 * Author: Chad Brewbaker * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- It is useful to have Array return a repeated permutation. Rather than add another method, we could overload Array#at to take multiple indexes. ~~~ruby a = [ "a", "b", "c", "d", "e" ] a.at(0) #=> "a" a.at(-1) #=> "e" #New stuff a.at(0,1) #=> ["a", "b"] a.at(0,0) #=> ["a", "a") a.at([2,3]) #=> ["c", "d"] a.at([-1,1]) #=> ["e", "b"] ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: