summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-10 13:39:52 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-06-10 13:39:52 +0000
commit238f78f0b111d7a722446e2f439a02927698cf2e (patch)
tree5b170b161c4805c12c7c70243004f97a9a82d704 /ext
parentfa1261e0938e3a8aa92f49b290fcfa7e8a4cddda (diff)
* ext/sdbm/init.c (fsdbm_store): sdbm should use StringValue().
[ruby-talk:103062] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/sdbm/init.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c
index 2dfd17196c..0f9ae1dbff 100644
--- a/ext/sdbm/init.c
+++ b/ext/sdbm/init.c
@@ -475,14 +475,12 @@ fsdbm_store(obj, keystr, valstr)
}
fdbm_modify(obj);
- keystr = rb_obj_as_string(keystr);
+ StringValue(keystr);
key.dptr = RSTRING(keystr)->ptr;
key.dsize = RSTRING(keystr)->len;
- if (NIL_P(valstr)) return fsdbm_delete(obj, keystr);
-
- valstr = rb_obj_as_string(valstr);
+ StringValue(valstr);
val.dptr = RSTRING(valstr)->ptr;
val.dsize = RSTRING(valstr)->len;