diff --git a/ChangeLog b/ChangeLog index bd4126a528..291d8fcf78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,11 @@ Sun Oct 21 18:29:17 2007 Nobuyoshi Nakada * encoding.c (set_primary_encoding): removed primary_encoding setter. +Sat Oct 20 13:17:01 2007 Yukihiro Matsumoto + + * enum.c (enum_cycle): hide temporary array from ObjectSpace. + [ruby-core:12762] + Sat Oct 20 11:49:20 2007 Nobuyoshi Nakada * file.c (rb_get_path): returns frozen string. diff --git a/enum.c b/enum.c index 0a64b5740d..82a64fe0a3 100644 --- a/enum.c +++ b/enum.c @@ -1541,17 +1541,20 @@ static VALUE enum_cycle(VALUE obj) { VALUE ary; - long i; + long i, len; RETURN_ENUMERATOR(obj, 0, 0); ary = rb_ary_new(); + RBASIC(ary)->klass = 0; rb_block_call(obj, id_each, 0, 0, cycle_i, ary); - while (RARRAY_LEN(ary) > 0) { - for (i=0; i