ruby-cvs:23820
From: knu ruby-lang.org
Date: Sun, 25 May 2008 05:07:55 +0900 (JST)
Subject: [ruby-cvs:23820] Ruby:r16582 (ruby_1_8): * array.c (rb_ary_slice_bang): Be consistent with Array#slice()
knu 2008-05-25 05:07:54 +0900 (Sun, 25 May 2008)
New Revision: 16582
Modified files:
branches/ruby_1_8/ChangeLog
branches/ruby_1_8/array.c
branches/ruby_1_8/enumerator.c
Log:
* array.c (rb_ary_slice_bang): Be consistent with Array#slice()
and String#slice!(). Just return nil when a negative length or
out of boundary index is given instead of raising an exception
via internal functions.
(rb_ary_slice_bang): should not use rb_ary_subseq() which shares
internal pointer. splice modifies the receiver right after
subseq. [ruby-dev:34005]
(rb_ary_slice_bang): should adjust length before making
sub-array.
* enumerator.c (Init_Enumerator): Override
Enumerable::Enumerator#each_with_index with #with_index.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=16582&r2=16581&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/enumerator.c?r1=16582&r2=16581&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/array.c?r1=16582&r2=16581&diff_format=u