From: Gavin Sinclair Date: 2002-11-21T18:01:48+09:00 Subject: Re: Array#shift(n)? From: "Gavin Sinclair" > Pretty obvious question, really. > Hmmm.... no-one's taken the ball... I have two or three times now wished that Array#shift(n) was implemented. (quickly checks that it's not...) As in: x = [1,2,3,4,5] x.shift # => 1 x.shift(2) # => [2, 3] I can (now) sort of see why that might be a bit irksome - returning different types - but in practice: foo, bar = ARGV.shift(2) baz = ARGV.shift That would work under the specification-by-example above. I know I can use #slice!, but #shift just seems so right. Gavin