From 42f0ec97691b4963e61159782ac2af877c8a23b4 Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 24 Jul 2004 09:48:21 +0000 Subject: * range.c (rb_range_beg_len): returns Qnil only when "beg" points outside of a range. No boundary check for "end". git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'array.c') diff --git a/array.c b/array.c index 10b6d6450..a3b4b4f64 100644 --- a/array.c +++ b/array.c @@ -620,10 +620,8 @@ rb_ary_subseq(ary, beg, len) * continuing for _length_ elements, or returns a subarray * specified by _range_. * Negative indices count backward from the end of the - * array (-1 is the last element). Returns nil if any indices - * are out of range unless the index equals the array size and a - * _length_ or _range_ parameter is given, in which case an - * empty array is returned. + * array (-1 is the last element). Returns nil if the index + * (or starting index) are out of range. * * a = [ "a", "b", "c", "d", "e" ] * a[2] + a[0] + a[1] #=> "cab" -- cgit