* array.c (rb_ary_splice): remove redundant check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6bacaabffd
commit
2e51b7f9da
@ -1,3 +1,7 @@
|
|||||||
|
Thu Oct 30 01:32:15 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
|
* array.c (rb_ary_splice): remove redundant check.
|
||||||
|
|
||||||
Thu Oct 30 01:24:55 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
Thu Oct 30 01:24:55 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* string.c (rb_str_cmp): fix condition which always returned true
|
* string.c (rb_str_cmp): fix condition which always returned true
|
||||||
|
4
array.c
4
array.c
@ -1198,10 +1198,6 @@ rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl)
|
|||||||
else {
|
else {
|
||||||
long alen;
|
long alen;
|
||||||
|
|
||||||
if (beg + len > RARRAY_LEN(ary)) {
|
|
||||||
len = RARRAY_LEN(ary) - beg;
|
|
||||||
}
|
|
||||||
|
|
||||||
alen = RARRAY_LEN(ary) + rlen - len;
|
alen = RARRAY_LEN(ary) + rlen - len;
|
||||||
if (alen >= ARY_CAPA(ary)) {
|
if (alen >= ARY_CAPA(ary)) {
|
||||||
ary_resize_capa(ary, alen);
|
ary_resize_capa(ary, alen);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user