From 90632decf63208ff1f8eab710c480d06798985cc Mon Sep 17 00:00:00 2001 From: knu Date: Wed, 13 Mar 2002 09:44:59 +0000 Subject: * lib/getopts.rb: single_options can be nil[*], and is not not optional. ([*]Pointed out by gotoken) git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/getopts.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/getopts.rb b/lib/getopts.rb index e29e4211e..b1cffd9ba 100644 --- a/lib/getopts.rb +++ b/lib/getopts.rb @@ -18,7 +18,7 @@ $RCS_ID=%q$Header$ -def getopts(single_options = '', *options) +def getopts(single_options, *options) boolopts = {} valopts = {} @@ -31,7 +31,7 @@ def getopts(single_options = '', *options) else valopts[opt[0, 1]] = nil end - end + end if single_options options.each do |arg| opt, val = arg.split(':', 2) -- cgit