diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-21 03:10:03 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-21 03:10:03 +0000 |
commit | a7df5ace7e13760c9c175a6de3273bffb50346d4 (patch) | |
tree | 03ff6825c529f4bcb034c86de00db75cff5dab38 /lib/rdoc/options.rb | |
parent | f8e51f7e5958a4962d620c66af2e93cbf6f52f11 (diff) | |
download | ruby-a7df5ace7e13760c9c175a6de3273bffb50346d4.tar.gz |
Update to RDoc 2.5.5
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/options.rb')
-rw-r--r-- | lib/rdoc/options.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/rdoc/options.rb b/lib/rdoc/options.rb index f67241bc03..45b69186f9 100644 --- a/lib/rdoc/options.rb +++ b/lib/rdoc/options.rb @@ -350,13 +350,14 @@ Usage: #{opt.program_name} [options] [names...] end argv.insert(0, *ENV['RDOCOPT'].split) if ENV['RDOCOPT'] + ignored = [] begin opts.parse! argv rescue OptionParser::InvalidArgument, OptionParser::InvalidOption => e - if ignore_invalid and not quiet then - $stderr.puts e - $stderr.puts '(invalid options are ignored)' + if ignore_invalid then + ignored << e.args.join(' ') + retry else $stderr.puts opts $stderr.puts @@ -365,6 +366,11 @@ Usage: #{opt.program_name} [options] [names...] end end + if ignored and not quiet then + $stderr.puts "invalid options: #{ignored.join ', '}" + $stderr.puts '(invalid options are ignored)' + end + @op_dir ||= 'doc' @files = argv.dup |