1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
matz 2004-10-19 19:49:49 +00:00
parent 9f6b3edcd6
commit 39ecad1339
3 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,10 @@
Wed Oct 20 04:17:55 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* 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.
Wed Oct 20 01:37:18 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
* array.c (rb_ary_times): Array#* should return an instance of

View file

@ -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)) {

View file

@ -334,6 +334,7 @@ fsdbm_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 (sdbm_delete(dbm, key)) {