From 93fd00b5ff877fbc2ceea7d8ca0c9fac8875c124 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 10 Jun 2008 11:13:58 +0000 Subject: * ext/extmk.rb: negate default of --without-ext if --with-ext is given. git-svn-id: http://svn.ruby-lang.org/repos/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 086501872..76f1211c5 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 8734eae00..ab2ae4f3e 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) -- cgit