From f95521702822e8bdbe10a03f2e796dab0370aeba Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 10 Jun 2008 11:13:58 +0000 Subject: [PATCH] * ext/extmk.rb: negate default of --without-ext if --with-ext is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 ++++- ext/extmk.rb | 8 ++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0865018727..76f1211c56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Tue Jun 10 18:12:17 2008 Nobuyoshi Nakada +Tue Jun 10 20:13:56 2008 Nobuyoshi Nakada + + * ext/extmk.rb: negate default of --without-ext if --with-ext is + given. * ext/extmk.rb: negate default of --without-ext. diff --git a/ext/extmk.rb b/ext/extmk.rb index 8734eae00f..ab2ae4f3ee 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -406,8 +406,12 @@ else proc {|c1| w.collect {|o| o.split(/,/)}.flatten.any?(&c1)} end } - withes ||= proc {false} - withouts ||= proc {true} + if withes + withouts ||= proc {true} + else + withes = proc {false} + withouts ||= withes + end cond = proc {|ext, *| cond1 = proc {|n| File.fnmatch(n, ext)} withes.call(cond1) or !withouts.call(cond1)