ruby-changes:9362
From: nobu <ko1@a...>
Date: Sun, 21 Dec 2008 14:46:19 +0900 (JST)
Subject: [ruby-changes:9362] Ruby:r20900 (trunk): * lib/optparse.rb (parse_in_order): splat values to be passed.
nobu 2008-12-21 14:46:01 +0900 (Sun, 21 Dec 2008) New Revision: 20900 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20900 Log: * lib/optparse.rb (parse_in_order): splat values to be passed. Modified files: trunk/ChangeLog trunk/lib/optparse.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 20899) +++ ChangeLog (revision 20900) @@ -1,3 +1,7 @@ +Sun Dec 21 14:45:58 2008 Nobuyoshi Nakada <nobu@r...> + + * lib/optparse.rb (parse_in_order): splat values to be passed. + Sun Dec 21 13:50:37 2008 TAKAO Kouji <kouji@t...> * test/readline/test_readline.rb Index: lib/optparse.rb =================================================================== --- lib/optparse.rb (revision 20899) +++ lib/optparse.rb (revision 20900) @@ -1263,7 +1263,7 @@ end begin opt, cb, val = sw.parse(rest, argv) {|*exc| raise(*exc)} - val = cb.call(val) if cb + val = cb.call(*val) if cb setter.call(sw.switch_name, val) if setter rescue ParseError raise $!.set_option(arg, rest) @@ -1294,7 +1294,7 @@ opt, cb, val = sw.parse(val, argv) {|*exc| raise(*exc) if eq} raise InvalidOption, arg if has_arg and !eq and arg == "-#{opt}" argv.unshift(opt) if opt and (opt = opt.sub(/\A-*/, '-')) != '-' - val = cb.call(val) if cb + val = cb.call(*val) if cb setter.call(sw.switch_name, val) if setter rescue ParseError raise $!.set_option(arg, arg.length > 2) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/