diff options
author | Junichi Ito <[email protected]> | 2022-11-29 08:07:47 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2022-12-26 15:09:21 +0900 |
commit | cea6951ecf31b1d4e93d102cc8f08822470d4d1a () | |
tree | 85ee9e9de3a38e21ea1cea6b373c2c68435239f0 /lib/optparse.rb | |
parent | 4c767c1354038804abd1c94e7f549ed4f95a3d31 (diff) |
[ruby/optparse] Add symbolize_names to getopts
https://.com/ruby/optparse/commit/3e63d878f8
Notes: Merged: https://.com/ruby/ruby/pull/7025
-rw-r--r-- | lib/optparse.rb | 21 |
1 files changed, 15 insertions, 6 deletions
@@ -1775,7 +1775,16 @@ XXX # # params["bar"] = "x" # --bar x # # params["zot"] = "z" # --zot Z # - def getopts(*args) argv = Array === args.first ? args.shift : default_argv single_options, *long_options = *args @@ -1804,14 +1813,14 @@ XXX end parse_in_order(argv, result.method(:[]=)) - result end # # See #getopts. # - def self.getopts(*args) - new.getopts(*args) end # @@ -2289,8 +2298,8 @@ XXX # rescue OptionParser::ParseError # end # - def getopts(*args) - options.getopts(self, *args) end # |