From 6f8bf830b44c9394a6afed4b02ecd4bc6b960342 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 10 Jun 2008 09:12:19 +0000 Subject: [PATCH] * ext/extmk.rb: negate default of --without-ext. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ ext/extmk.rb | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2e1c5a9df1..0865018727 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Jun 10 18:12:17 2008 Nobuyoshi Nakada + + * ext/extmk.rb: negate default of --without-ext. + Tue Jun 10 17:43:35 2008 Yukihiro Matsumoto * array.c (rb_ary_shuffle_bang): update RDoc. [ruby-dev:35034] diff --git a/ext/extmk.rb b/ext/extmk.rb index 309baa9b3f..8734eae00f 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -399,13 +399,15 @@ if $extension else withes, withouts = %w[--with --without].collect {|w| if not (w = %w[-extensions -ext].collect {|o|arg_config(w+o)}).any? - proc {false} + nil elsif (w = w.grep(String)).empty? proc {true} else proc {|c1| w.collect {|o| o.split(/,/)}.flatten.any?(&c1)} end } + withes ||= proc {false} + withouts ||= proc {true} cond = proc {|ext, *| cond1 = proc {|n| File.fnmatch(n, ext)} withes.call(cond1) or !withouts.call(cond1)