diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-08 02:18:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-08 02:18:15 +0000 |
commit | 9ce99124f8976944584538489698bef32991d413 (patch) | |
tree | 2f12947a30e5e29cb6f5230bb71cb4c33bd0b72f /variable.c | |
parent | 86985f88d5f5bb9c162722e7f6ff3dab928b7771 (diff) | |
download | ruby-9ce99124f8976944584538489698bef32991d413.tar.gz ruby-9ce99124f8976944584538489698bef32991d413.tar.xz ruby-9ce99124f8976944584538489698bef32991d413.zip |
* variable.c (autoload_delete, autoload_file): should not delete
autoload table, since it may be shared with duplicated modules.
[ruby-core:19181]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/variable.c b/variable.c index a5fbf28f5..62377d0c7 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; } |