diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-03-23 08:37:35 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-03-23 08:37:35 +0000 |
commit | 688169fd83b24564b653c03977c168cea50ccd35 (patch) | |
tree | b4724e5397cf5da5b554ab5795842a93145a88be /hash.c | |
parent | 5c13dd59db1ee6c04cdac4ce2ee97d5934115439 (diff) |
2000-03-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -411,10 +411,11 @@ rb_hash_delete(hash, key) VALUE val; rb_hash_modify(hash); - if (RHASH(hash)->iter_lev > 0 && - st_delete_safe(RHASH(hash)->tbl, &key, &val, Qundef)) { - FL_SET(hash, HASH_DELETED); - return val; + if (RHASH(hash)->iter_lev > 0) { + if (st_delete_safe(RHASH(hash)->tbl, &key, &val, Qundef)) { + FL_SET(hash, HASH_DELETED); + return val; + } } else if (st_delete(RHASH(hash)->tbl, &key, &val)) return val; |