From: sto.mar@... Date: 2013-03-05T16:20:25+09:00 Subject: Re: Inconsistent Array#slice behavior? Am 05.03.2013 08:01, schrieb Jack R.: > Given x = [], > > x[0, 2] => [] > x[-3,2] => nil > > Documentation says that out-of-range indices produce a nil result, but 0 > s/b out-of-range for an empty array, shouldn't it? > No. Take a closer look at the documentation, especially the "special" cases. http://www.ruby-doc.org/core-2.0/Array.html#method-i-slice Note: the 2.0 docs apply also to 1.9.3, the crucial part concerning this "inconsistency" has been added only recently. --