diff --git a/ChangeLog b/ChangeLog index 93b019892b..862cc5db97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Oct 8 11:18:12 2008 Nobuyoshi Nakada + + * variable.c (autoload_delete, autoload_file): should not delete + autoload table, since it may be shared with duplicated modules. + [ruby-core:19181] + Wed Oct 8 02:38:28 2008 Yukihiro Matsumoto * encoding.c (rb_default_internal_encoding): merged a patch from diff --git a/variable.c b/variable.c index a5fbf28f5f..62377d0c7e 100644 --- a/variable.c +++ b/variable.c @@ -1374,12 +1374,8 @@ autoload_delete(VALUE mod, ID id) st_delete(tbl, (st_data_t*)&id, &load); if (tbl->num_entries == 0) { - DATA_PTR(val) = 0; - st_free_table(tbl); id = autoload; - if (st_delete(RCLASS_IV_TBL(mod), (st_data_t*)&id, &val)) { - rb_gc_force_recycle(val); - } + st_delete(RCLASS_IV_TBL(mod), (st_data_t*)&id, &val); } } @@ -1421,12 +1417,8 @@ autoload_file(VALUE mod, ID id) /* already loaded but not defined */ st_delete(tbl, (st_data_t*)&id, 0); if (!tbl->num_entries) { - DATA_PTR(val) = 0; - st_free_table(tbl); id = autoload; - if (st_delete(RCLASS_IV_TBL(mod), (st_data_t*)&id, &val)) { - rb_gc_force_recycle(val); - } + st_delete(RCLASS_IV_TBL(mod), (st_data_t*)&id, &val); } return Qnil; }