From: nobu.nokada@... Date: 2003-06-24T02:40:25+09:00 Subject: Re: [bug] Array#unshift() zero arguments Hi, At Tue, 24 Jun 2003 01:39:15 +0900, Simon Strandgaard wrote: > irb(main):001:0> [].unshift() > IndexError: index -1 out of array > from (irb):1:in `unshift' > from (irb):1 > irb(main):002:0> [].unshift(*[]) > IndexError: index -1 out of array > from (irb):2:in `unshift' > from (irb):2 > irb(main):003:0> [].push(*[]) > => [] Also unshifting without arguments clobbers last element. $ ruby -e 'p [1].unshift()' [nil] -- Nobu Nakada