summaryrefslogtreecommitdiff
path: root/ext/dbm
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-19 19:49:49 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-10-19 19:49:49 +0000
commit39ecad1339f5c41eff1ca54155c0dea4c566e13c (patch)
tree65b8fd169ee422e1824ee943639d2d1b2b51cd59 /ext/dbm
parent9f6b3edcd65e2f62f38106495f03f986f6dc9673 (diff)
* ext/dbm/dbm.c (fdbm_delete_if): should check if deleting element
is a string. [ruby-dev:24490] * ext/sdbm/init.c (fsdbm_delete_if): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dbm')
-rw-r--r--ext/dbm/dbm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c
index e72d8eb..c4f8b2b 100644
--- a/ext/dbm/dbm.c
+++ b/ext/dbm/dbm.c
@@ -356,6 +356,7 @@ fdbm_delete_if(obj)
for (i = 0; i < RARRAY(ary)->len; i++) {
keystr = RARRAY(ary)->ptr[i];
+ StringValue(keystr);
key.dptr = RSTRING(keystr)->ptr;
key.dsize = RSTRING(keystr)->len;
if (dbm_delete(dbm, key)) {