From: matz@... (Yukihiro Matsumoto) Date: 2000-11-24T01:29:21+09:00 Subject: [ruby-talk:6554] Re: Small note on docs for Array#[] Hi, In message "[ruby-talk:6548] Small note on docs for Array#[]" on 00/11/23, Robert Feldt writes: | |IMHO the text | |"... Returns nil if any indices are out of range" | |from the docs for Array#[] does not fully specify the following behavior | |$ ruby -v -e 'puts [1,2,3][2,2].inspect' |ruby 1.6.2 (2000-11-20) [i686-cygwin] |[3] |$ ruby -v -e 'puts [1,2,3][2..3].inspect' |ruby 1.6.2 (2000-11-20) [i686-cygwin] |[3] For getting subarray, `index' means the start point of the subarray. Is this make it clear? matz.