From: Joel VanderWerf Date: 2003-11-12T06:45:21+09:00 Subject: Re: Array#slice oddity... Matthew Berg wrote: > It appears that if you use slice or slice! with a length argument, it > returns an array even if the index is out of range: > > irb(main):001:0> a = [] > => [] > irb(main):002:0> b = a.slice(0) > => nil > irb(main):003:0> b = a.slice(0,1) > => [] Shouldn't a[0] and a[0,1][0] return the same value?