summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-21 08:31:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-07-21 08:31:47 +0000
commit5f534b7d4684f5bf826ab9ad4dac166f5b938f1d (patch)
treea611c9240275351ef479c965de089f5ecd89cf05
parentc4dfd0ccfbc325d3231de655f9f0dfc4cdfc8593 (diff)
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
-rw-r--r--lib/optparse.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index b99b0a41cd..c38aec38be 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -1653,11 +1653,11 @@ XXX
# Wrapper method for getopts.rb.
#
# params = ARGV.getopts("ab:", "foo", "bar:", "zot:Z;zot option")
- # # params[:a] = true # -a
- # # params[:b] = "1" # -b1
- # # params[:foo] = "1" # --foo
- # # params[:bar] = "x" # --bar x
- # # params[:zot] = "z" # --zot Z
+ # # params["a"] = true # -a
+ # # params["b"] = "1" # -b1
+ # # params["foo"] = "1" # --foo
+ # # params["bar"] = "x" # --bar x
+ # # params["zot"] = "z" # --zot Z
#
def getopts(*args)
argv = Array === args.first ? args.shift : default_argv