* ext/extmk.rb: negate default of --without-ext.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@17077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-06-10 09:12:19 +00:00
parent eb362405e1
commit 9f8ead3f5a
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Tue Jun 10 18:12:17 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb: negate default of --without-ext.
Tue Jun 10 17:01:58 2008 wanabe <s.wanabe@gmail.com>
* util.c (ruby_strtod): ruby_strtod don't allow a trailing

View file

@ -408,13 +408,15 @@ if $extension
else
withes, withouts = %w[--with --without].collect {|w|
if not (w = %w[-extensions -ext].collect {|opt|arg_config(w+opt)}).any?
proc {false}
nil
elsif (w = w.grep(String)).empty?
proc {true}
else
proc {|c1| w.collect {|opt| opt.split(/,/)}.flatten.any?(&c1)}
end
}
withes ||= proc {false}
withouts ||= proc {true}
cond = proc {|ext|
cond1 = proc {|n| File.fnmatch(n, ext, File::FNM_PATHNAME)}
withes.call(cond1) or !withouts.call(cond1)