From: daz Date: 2005-07-22T18:10:57+09:00 Subject: Re: Odd Array#[x..y] return values Daniel Berger wrote: > Hi all, > > Ruby 1.8.2 > > Consider: > > irb(main):001:0> a = [] > => [] > irb(main):002:0> a[0..1] > => [] > irb(main):003:0> a[-2..-1] > => nil > > Why does the first return [] and the second return nil? > Archive reading: http://groups.google.com/groups?threadm=BAY22-F7pSWerOc0Ne000000288@hotmail.com daz