summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-02 02:34:12 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-02 02:34:12 +0000
commit1201b970eeff276d516bf608d9de90f9610b0983 (patch)
tree3e7990d2c6b91042d01005e6a84b1e473beed335 /variable.c
parent3a23aad61c4a07a092aa9cba10f899d58d17c510 (diff)
merge revision(s) 19710:
* 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@21939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/variable.c b/variable.c
index 7e548c3704..cb7ac31609 100644
--- a/variable.c
+++ b/variable.c
@@ -1325,12 +1325,8 @@ autoload_delete(mod, 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(mod)->iv_tbl, (st_data_t*)&id, &val)) {
- rb_gc_force_recycle(val);
- }
+ st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val);
}
}
@@ -1376,12 +1372,8 @@ autoload_file(mod, 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(mod)->iv_tbl, (st_data_t*)&id, &val)) {
- rb_gc_force_recycle(val);
- }
+ st_delete(RCLASS(mod)->iv_tbl, (st_data_t*)&id, &val);
}
return Qnil;
}