mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
optparse.rb: [DOC] fix keys
* lib/optparse.rb (getopts): [DOC] parameter keys are strings, not symbols. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c4dfd0ccfb
commit
5f534b7d46
1 changed files with 5 additions and 5 deletions
|
@ -1653,11 +1653,11 @@ XXX
|
||||||
# Wrapper method for getopts.rb.
|
# Wrapper method for getopts.rb.
|
||||||
#
|
#
|
||||||
# params = ARGV.getopts("ab:", "foo", "bar:", "zot:Z;zot option")
|
# params = ARGV.getopts("ab:", "foo", "bar:", "zot:Z;zot option")
|
||||||
# # params[:a] = true # -a
|
# # params["a"] = true # -a
|
||||||
# # params[:b] = "1" # -b1
|
# # params["b"] = "1" # -b1
|
||||||
# # params[:foo] = "1" # --foo
|
# # params["foo"] = "1" # --foo
|
||||||
# # params[:bar] = "x" # --bar x
|
# # params["bar"] = "x" # --bar x
|
||||||
# # params[:zot] = "z" # --zot Z
|
# # params["zot"] = "z" # --zot Z
|
||||||
#
|
#
|
||||||
def getopts(*args)
|
def getopts(*args)
|
||||||
argv = Array === args.first ? args.shift : default_argv
|
argv = Array === args.first ? args.shift : default_argv
|
||||||
|
|
Loading…
Reference in a new issue