mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/dbm/dbm.c (fdbm_indexes, fdbm_select): add a missing
argument and prevent coredump when a nonexistent key is specified. * ext/sdbm/init.c (fsdbm_indexes, fsdbm_select): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3da9449263
commit
9e4cfb5da4
3 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
|||
Sat Oct 26 04:27:35 2002 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* ext/dbm/dbm.c (fdbm_indexes, fdbm_select): add a missing
|
||||
argument and prevent coredump when a nonexistent key is
|
||||
specified.
|
||||
|
||||
* ext/sdbm/init.c (fsdbm_indexes, fsdbm_select): ditto.
|
||||
|
||||
Sat Oct 26 03:28:43 2002 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* eval.c, gc.c: use a common set of alloca() #ifdef's. This fixes
|
||||
|
|
|
@ -221,7 +221,7 @@ fdbm_indexes(argc, argv, obj)
|
|||
|
||||
new = rb_ary_new2(argc);
|
||||
for (i=0; i<argc; i++) {
|
||||
rb_ary_push(new, fdbm_fetch(obj, argv[i]));
|
||||
rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
|
||||
}
|
||||
|
||||
return new;
|
||||
|
@ -259,7 +259,7 @@ fdbm_select(argc, argv, obj)
|
|||
}
|
||||
else {
|
||||
for (i=0; i<argc; i++) {
|
||||
rb_ary_push(new, fdbm_fetch(obj, argv[i]));
|
||||
rb_ary_push(new, fdbm_fetch(obj, argv[i], Qnil));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ fsdbm_indexes(argc, argv, obj)
|
|||
|
||||
new = rb_ary_new2(argc);
|
||||
for (i=0; i<argc; i++) {
|
||||
rb_ary_push(new, fsdbm_fetch(obj, argv[i]));
|
||||
rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
|
||||
}
|
||||
|
||||
return new;
|
||||
|
@ -247,7 +247,7 @@ fsdbm_select(argc, argv, obj)
|
|||
}
|
||||
else {
|
||||
for (i=0; i<argc; i++) {
|
||||
rb_ary_push(new, fsdbm_fetch(obj, argv[i]));
|
||||
rb_ary_push(new, fsdbm_fetch(obj, argv[i], Qnil));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue