diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-25 05:28:24 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-25 05:28:24 +0000 |
commit | 27ea12bc77a1c9902da4474604bde2ca25b905f6 (patch) | |
tree | 5f454a9d4b1db9e4368634cb7a76d54648a7683e /variable.c | |
parent | 4d5109d84de577c1c897b1722c9e58b64b341ab4 (diff) | |
download | ruby-27ea12bc77a1c9902da4474604bde2ca25b905f6.tar.gz ruby-27ea12bc77a1c9902da4474604bde2ca25b905f6.tar.xz ruby-27ea12bc77a1c9902da4474604bde2ca25b905f6.zip |
* variable.c (autoload_delete): should delete Qundef from iv_tbl.
(ruby-bugs-ja PR#504)
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r-- | variable.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/variable.c b/variable.c index 5c65c0425..eb1f3e32b 100644 --- a/variable.c +++ b/variable.c @@ -1170,12 +1170,13 @@ autoload_delete(mod, id) { VALUE val, file = Qnil; + st_delete(RCLASS(mod)->iv_tbl, &id, 0); if (st_lookup(RCLASS(mod)->iv_tbl, autoload, &val)) { struct st_table *tbl = check_autoload_table(val); if (!st_delete(tbl, &id, &file)) file = Qnil; - if (!tbl->num_entries) { + if (tbl->num_entries == 0) { DATA_PTR(val) = 0; st_free_table(tbl); id = autoload; |