diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-25 19:31:55 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-25 19:31:55 +0000 |
commit | 83d7d431f1095e9abc91024947837ccd0cb24620 (patch) | |
tree | 3674a7a6420b125d71ae9bc58fe5022e233a2c73 /ext/sdbm | |
parent | 49402a88e36108629e7c5b5dd37c633b660106b9 (diff) | |
download | ruby-83d7d431f1095e9abc91024947837ccd0cb24620.tar.gz ruby-83d7d431f1095e9abc91024947837ccd0cb24620.tar.xz ruby-83d7d431f1095e9abc91024947837ccd0cb24620.zip |
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@2996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/sdbm')
-rw-r--r-- | ext/sdbm/init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/sdbm/init.c b/ext/sdbm/init.c index 280637aa2..99945d3a7 100644 --- a/ext/sdbm/init.c +++ b/ext/sdbm/init.c @@ -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)); } } |