diff --git a/ChangeLog b/ChangeLog index deece5f208..02bd813e78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Jan 17 23:36:33 2011 Tanaka Akira + + * array.c (rb_ary_times): less MEMCPY calls. + Mon Jan 17 22:54:33 2011 Tanaka Akira * debug.h: parenthesize macro arguments. diff --git a/array.c b/array.c index 51ec2f9910..7624e1ffe5 100644 --- a/array.c +++ b/array.c @@ -2988,7 +2988,7 @@ static VALUE rb_ary_times(VALUE ary, VALUE times) { VALUE ary2, tmp, *ptr, *ptr2; - long i, t, len; + long t, len; tmp = rb_check_string_type(times); if (!NIL_P(tmp)) { @@ -3014,8 +3014,15 @@ rb_ary_times(VALUE ary, VALUE times) ptr = RARRAY_PTR(ary); ptr2 = RARRAY_PTR(ary2); t = RARRAY_LEN(ary); - for (i=0; i