summaryrefslogtreecommitdiff
path: root/ext/extmk.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-21 08:08:36 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-21 08:08:36 +0000
commit2ca2a4a43bb018bfd84fccc75e395c1f0e58acc6 (patch)
tree60b46bd4507018b7c53ba2702d11119699c92779 /ext/extmk.rb
parentad5f0fc6ccba716676a40c0a635fd41a8a782d4a (diff)
* parse.y (block_param): do not use multiple assignment for a sole
block parameter. [ruby-dev:28710] * eval.c (rb_yield_0): pass a raw yielded value to a sole block parameter if a value is passed by yield. * eval.c (proc_invoke): args may not be an array. * eval.c (rb_proc_yield): pass original value without wrapping it in an array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/extmk.rb')
-rw-r--r--ext/extmk.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb
index a799544f04..5cd7f498cc 100644
--- a/ext/extmk.rb
+++ b/ext/extmk.rb
@@ -213,14 +213,10 @@ def parse_args()
opts = nil
$optparser ||= OptionParser.new do |opts|
opts.on('-n') {$dryrun = true}
- opts.on('--[no-]extension [EXTS]', Array) do |*v|
- v.compact!
- v = v[0] if v.size == 1 and !v[0]
+ opts.on('--[no-]extension [EXTS]', Array) do |v|
$extension = (v == false ? [] : v)
end
- opts.on('--[no-]extstatic [STATIC]', Array) do |*v|
- v.compact!
- v = v[0] if v.size == 1 and !v[0]
+ opts.on('--[no-]extstatic [STATIC]', Array) do |v|
if ($extstatic = v) == false
$extstatic = []
elsif v
@@ -237,7 +233,7 @@ def parse_args()
opts.on('--make=MAKE') do |v|
$make = v || 'make'
end
- opts.on('--make-flags=FLAGS', '--mflags', Shellwords) do |*v|
+ opts.on('--make-flags=FLAGS', '--mflags', Shellwords) do |v|
v.grep(/\A([-\w]+)=(.*)/) {$configure_args["--#{$1}"] = $2}
if arg = v.first
arg.insert(0, '-') if /\A[^-][^=]*\Z/ =~ arg
@@ -358,7 +354,7 @@ end unless $extstatic
ext_prefix = "#{$top_srcdir}/ext"
exts = $static_ext.sort_by {|t, i| i}.collect {|t, i| t}
-if $extension && $extension.size > 0
+if $extension
exts |= $extension.select {|d| File.directory?("#{ext_prefix}/#{d}")}
else
withes, withouts = %w[--with --without].collect {|w|