From ed520cf6e96dcae2b7900127e325fcea1f4abc26 Mon Sep 17 00:00:00 2001 From: matz Date: Thu, 8 Feb 2001 09:19:27 +0000 Subject: * parse.y (parse_quotedwords): %w should allow parenthesis escape. * parse.y (parse_qstring): %q should allow terminator escape. * re.c (rb_reg_options): new method to give an option values. * parse.y (cond0): disable special treating of integer literal in conditional unless option -e is supplied. changes current behavior. experimental. * parse.y (cond0): give warning for string/integer literals and dot operators in conditionals unless option -e is supplied. * re.c (rb_reg_equal): all option flags should be same to be equal. * error.c (Init_Exception): make Interrupt a subclass of SignalException. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/gdbm/gdbm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/gdbm/gdbm.c') diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c index d84c7bedd4..fad06fa727 100644 --- a/ext/gdbm/gdbm.c +++ b/ext/gdbm/gdbm.c @@ -518,7 +518,7 @@ static VALUE fgdbm_has_key(obj, keystr) VALUE obj, keystr; { - datum key, val; + datum key; struct dbmdata *dbmp; GDBM_FILE dbm; @@ -528,8 +528,8 @@ fgdbm_has_key(obj, keystr) GetDBM(obj, dbmp); dbm = dbmp->di_dbm; - val = gdbm_fetch(dbm, key); - if (val.dptr) return Qtrue; + if (gdbm_exists(dbm, key)) + return Qtrue; return Qfalse; } -- cgit v1.2.3