mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/getopts.rb: single_options can be nil[*], and is not not
optional. ([*]Pointed out by gotoken) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
8b6ad9131e
commit
14461ddae6
3 changed files with 18 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue