1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/extmk.rb (parse_args): provisional catch-up for the recent changes.

* lib/optparse.rb (OptionParser::List#summarize, OptionParser#order!): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2006-06-20 14:28:49 +00:00
parent 3be20019c1
commit 8446b6c59b
3 changed files with 16 additions and 6 deletions

View file

@ -1,3 +1,9 @@
Tue Jun 20 23:28:34 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/extmk.rb (parse_args): provisional catch-up for the recent changes.
* lib/optparse.rb (OptionParser::List#summarize, OptionParser#order!): ditto.
Tue Jun 20 11:07:55 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (proc_invoke): intercept break and return from lambda
@ -14,9 +20,9 @@ Tue Jun 20 11:07:55 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* eval.c (rb_yield_0): fix confusion between lambda (which is a
property of a proc) and pcall (which depends on whether it's
called via yield or call).
called via yield or call).
* eval.c (rb_thread_yield): no need to specify YIELD_LAMBDA_CALL.
* eval.c (rb_thread_yield): no need to specify YIELD_LAMBDA_CALL.
* eval.c (rb_block_pass): update blkid in prot_tag.

View file

@ -213,10 +213,14 @@ def parse_args()
opts = nil
$optparser ||= OptionParser.new do |opts|
opts.on('-n') {$dryrun = true}
opts.on('--[no-]extension [EXTS]', Array) do |v|
opts.on('--[no-]extension [EXTS]', Array) do |*v|
v.compact!
v = v[0] if v.size == 1 and !v[0]
$extension = (v == false ? [] : v)
end
opts.on('--[no-]extstatic [STATIC]', Array) do |v|
opts.on('--[no-]extstatic [STATIC]', Array) do |*v|
v.compact!
v = v[0] if v.size == 1 and !v[0]
if ($extstatic = v) == false
$extstatic = []
elsif v

View file

@ -670,7 +670,7 @@ class OptionParser
list.each do |opt|
if opt.respond_to?(:summarize) # perhaps OptionParser::Switch
opt.summarize(*args, &block)
elsif opt.empty?
elsif !opt or opt.empty?
yield("")
else
opt.each(&block)
@ -1319,7 +1319,7 @@ class OptionParser
end
begin
opt, sw, val = sw.parse(rest, argv) {|*exc| raise(*exc)}
sw.yield(*val) if sw
sw.yield(val) if sw
rescue ParseError
raise $!.set_option(arg, rest)
end