ruby-changes:47268
From: nobu <ko1@a...>
Date: Fri, 21 Jul 2017 17:31:55 +0900 (JST)
Subject: [ruby-changes:47268] nobu:r59383 (trunk): optparse.rb: [DOC] fix keys
nobu 2017-07-21 17:31:47 +0900 (Fri, 21 Jul 2017) New Revision: 59383 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=59383 Log: optparse.rb: [DOC] fix keys * lib/optparse.rb (getopts): [DOC] parameter keys are strings, not symbols. Modified files: trunk/lib/optparse.rb Index: lib/optparse.rb =================================================================== --- lib/optparse.rb (revision 59382) +++ lib/optparse.rb (revision 59383) @@ -1653,11 +1653,11 @@ XXX https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L1653 # 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/