aboutsummaryrefslogtreecommitdiffstats
path: root/ext/dbm
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-12 08:01:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-12 08:01:51 +0000
commit521f420a772c37cd4a90b51da7c18c18084c47ac (patch)
treed4f62cf751ae28840229d7389e22e8707a6b5f62 /ext/dbm
parent0eb08aa068abc9101d1452ce868126575782b471 (diff)
downloadruby-521f420a772c37cd4a90b51da7c18c18084c47ac.tar.gz
* ext/dbm/extconf.rb (headers.db_check): reduce duplicated code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dbm')
-rw-r--r--ext/dbm/extconf.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index 2fc5c441a5..b46688aa75 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -39,8 +39,8 @@ def headers.db_check(db)
have_library("gdbm") or return false
end
- if (hdr = self.fetch(db, ["ndbm.h"]).find {|h| have_type("DBM", h, hsearch)} or
- hdr = self.fetch(db, ["ndbm.h"]).find {|h| have_type("DBM", ["db.h", h], hsearch)}) and
+ hdrs = self.fetch(db, ["ndbm.h"])
+ if (hdr = hdrs.find {|h| have_type("DBM", h, hsearch)} || hdrs.find {|h| have_type("DBM", ["db.h", h], hsearch)}) and
(have_library(db, 'dbm_open("", 0, 0)', hdr, hsearch) || have_func('dbm_open("", 0, 0)', hdr, hsearch)) and
have_func('dbm_clearerr((DBM *)0)', hdr, hsearch)
if hsearch