mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
fa1261e093
commit
238f78f0b1
2 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue