ruby-changes:18198
From: usa <ko1@a...>
Date: Wed, 15 Dec 2010 20:51:51 +0900 (JST)
Subject: [ruby-changes:18198] Ruby:r30219 (trunk): * lib/test/unit.rb (process_args): need to setup @help to print options.
usa 2010-12-15 20:45:57 +0900 (Wed, 15 Dec 2010) New Revision: 30219 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30219 Log: * lib/test/unit.rb (process_args): need to setup @help to print options. Modified files: trunk/ChangeLog trunk/lib/test/unit.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 30218) +++ ChangeLog (revision 30219) @@ -1,3 +1,7 @@ +Wed Dec 15 20:45:02 2010 NAKAMURA Usaku <usa@r...> + + * lib/test/unit.rb (process_args): need to setup @help to print options. + Wed Dec 15 11:19:33 2010 NAKAMURA Usaku <usa@r...> * test/zlib/test_zlib.rb (test_to_io): forgotten to fix with r30201. Index: lib/test/unit.rb =================================================================== --- lib/test/unit.rb (revision 30218) +++ lib/test/unit.rb (revision 30219) @@ -36,13 +36,16 @@ end def process_args(args = []) + orig_args = args.dup options = {} OptionParser.new do |opts| setup_options(opts, options) opts.parse!(args) + orig_args -= args end args = @init_hook.call(args, options) if @init_hook non_options(args, options) + @help = orig_args.map { |s| s =~ /[\s|&<>$()]/ ? s.inspect : s }.join " " options end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/