summaryrefslogtreecommitdiff
path: root/lib/optparse.rb
AgeCommit message (Collapse)Author
2024-04-15[ruby/optparse] bump up to 0.5.0Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/f5018a8b1c
2024-04-15show warning for unused blockKoichi Sasada
With verbopse mode (-w), the interpreter shows a warning if a block is passed to a method which does not use the given block. Warning on: * the invoked method is written in C * the invoked method is not `initialize` * not invoked with `super` * the first time on the call-site with the invoked method (`obj.foo{}` will be warned once if `foo` is same method) [Feature #15554] `Primitive.attr! :use_block` is introduced to declare that primitive functions (written in C) will use passed block. For minitest, test needs some tweak, so use https://github.com/minitest/minitest/commit/ea9caafc0754b1d6236a490d59e624b53209734a for `test-bundled-gems`.
2024-03-01[ruby/optparse] Invoke pager for `--help`Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/77dccce37c
2024-02-23[ruby/optparse] [DOC] About return value of OptionParser#newNobuyoshi Nakada
https://github.com/ruby/optparse/commit/59b9fd7ddc
2024-02-23[ruby/optparse] Add `exact:` keyword argumentNobuyoshi Nakada
https://github.com/ruby/optparse/commit/07e83673a8
2024-02-15Do not include a backtick in error messages and backtracesYusuke Endoh
[Feature #16495]
2024-02-11[ruby/optparse] [DOC] Add missing documentsNobuyoshi Nakada
https://github.com/ruby/optparse/commit/33956ce93f
2024-02-11[ruby/optparse] Search exactly when `require_exact`Nobuyoshi Nakada
To work with options defined as `--[no]-something`. Fix https://bugs.ruby-lang.org/issues/20252 Fix https://github.com/ruby/optparse/pull/60 https://github.com/ruby/optparse/commit/78afdab307
2024-02-09[ruby/optparse] Adjust arguments for lambda-callbacksNobuyoshi Nakada
Rake uses [lambda] as callbacks. Calling it without omitted argument raises an `ArgumentError`. lambda: https://github.com/ruby/rake/blob/master/lib/rake/application.rb#L543 https://github.com/ruby/optparse/commit/213cb03b59
2024-02-09[ruby/optparse] Respect default values in block parametersNobuyoshi Nakada
Fix https://github.com/ruby/optparse/pull/55 https://github.com/ruby/optparse/commit/9d53e74aa4
2024-02-09[ruby/optparse] Fix `require_exact` to work with options defined as ↵fatkodima
`--[no]-something` https://github.com/ruby/optparse/commit/4e346ad337
2024-02-09[ruby/optparse] Escape backslashesNobuyoshi Nakada
https://github.com/ruby/optparse/commit/b14c2c644d
2023-12-25[ruby/optparse] [DOC] Add missing documentsNobuyoshi Nakada
https://github.com/ruby/optparse/commit/324ff21f04
2023-11-07[ruby/optparse] Bump up 0.4.0Hiroshi SHIBATA
https://github.com/ruby/optparse/commit/acbf6e3e12
2023-07-30[ruby/optparse] [DOC] Mark up constant and method names as codeNobuyoshi Nakada
https://github.com/ruby/optparse/commit/e8bee0be8f
2023-04-04[ruby/optparse] Document requires needed for ↵Jeremy Evans
Date/DateTime/Time/URI/Shellwords support Fixes [Bug #19566] https://github.com/ruby/optparse/commit/fb91d97c10
2022-12-26[ruby/optparse] Add symbolize_names to getoptsJunichi Ito
https://github.com/ruby/optparse/commit/3e63d878f8 Notes: Merged: https://github.com/ruby/ruby/pull/7025
2022-12-26[ruby/optparse] bump up to 0.4.0.pre.1Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/73661899ad Notes: Merged: https://github.com/ruby/ruby/pull/7025
2022-12-22[ruby/optparse] Bump version to 0.3.1Hiroshi SHIBATA
https://github.com/ruby/optparse/commit/2a1e157ae1
2022-12-21[ruby/optparse] The encoding argument of `Regexp.new` has been ignored since 1.9Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/766f567405
2022-12-05[ruby/optparse] Bump version to 0.3.0Hiroshi SHIBATA
https://github.com/ruby/optparse/commit/c80dfb1ebd
2022-11-28[ruby/optparse] Add `raise_unknown` flagNobuyoshi Nakada
(https://github.com/ruby/optparse/pull/38) https://github.com/ruby/optparse/commit/12529653cd
2022-11-21[ruby/optparse] Use class methods of `File` over `IO`Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/ab5073e4d8
2022-10-29[ruby/optparse] #load() into hashWhyme Lyu
(https://github.com/ruby/optparse/pull/42) OptionParser#load learns .load(into: Hash) https://github.com/ruby/optparse/commit/2ea626fcff Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2022-10-08[ruby/optparse] Don't treat empty string as an option descriptionMaciek Rząsa
https://github.com/ruby/optparse/commit/078638ee6d
2022-07-29[ruby/optparse] Also accept '-' as an optional argument ↵konsolebox
(https://github.com/ruby/optparse/pull/35) https://github.com/ruby/optparse/commit/f2b8318631 Notes: Merged: https://github.com/ruby/ruby/pull/6200
2022-04-04[ruby/optparse] Define `inspect` and `pretty_inspect`Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/a3f0ec21b1
2022-01-12[ruby/optparse] Fix links to the page directory files [Bug #18468]Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/dab72c543d
2021-10-21[ruby/optparse] Bump up optparse version to 0.2.0Hiroshi SHIBATA
https://github.com/ruby/optparse/commit/1226b670e6
2021-07-28[ruby/optparse] More on tutorial (https://github.com/ruby/optparse/pull/23)Burdette Lamar
- Removed a largish block of repeated text. - Added sections "Top List and Base List" and "Methods for Defining Options" (on, define, etc.). - Linked from class OptionParser doc to the tutorial. https://github.com/ruby/optparse/commit/7f3195b9db
2021-07-28[ruby/optparse] nodoc private methodsNobuyoshi Nakada
https://github.com/ruby/optparse/commit/f23d750d14
2021-04-11[ruby/optparse] Moved rdoc files to doc/optparseNobuyoshi Nakada
https://github.com/ruby/optparse/commit/cccb28e0de
2021-04-08[ruby/optparse] Make use of option_params.rdocBurdetteLamar
https://github.com/ruby/optparse/commit/d55d9284c3
2021-03-29[ruby/optparse] bump up to 0.1.1Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/2fe984a603
2021-03-29[ruby/optparse] Fixed error message of unparsed non-optionNobuyoshi Nakada
Close https://github.com/ruby/optparse/issues/3 https://github.com/ruby/optparse/commit/94c5cf4032
2021-03-29[ruby/optparse] Change *opts to *params, to avoid confusionBurdetteLamar
https://github.com/ruby/optparse/commit/f5f5e202dd
2021-03-29[ruby/optparse] Add OptionParser#require_exact accessorJeremy Evans
This allows you to disable allowing abbreviations of long options and using short options for long options. Implements Ruby Feature #11523 https://github.com/ruby/optparse/commit/dfefb2d2e2
2020-10-27Separate `send` into `public_send` and `__send__`Nobuyoshi Nakada
2020-07-23[ruby/optparse] Define OptionParser::VersionNobuyoshi Nakada
https://github.com/ruby/optparse/commit/4c0021b5b2
2019-11-12Revert "Method reference operator"Nobuyoshi Nakada
This reverts commit 67c574736912003c377218153f9d3b9c0c96a17b. [Feature #16275]
2019-10-26OptionParser: document into: argumentzverok
Notes: Merged: https://github.com/ruby/ruby/pull/2615
2019-10-21Make suggestions order stable [Bug #16263]Nobuyoshi Nakada
As the result order of `DidYouMean::SpellChecker#correct` is undefined, keep the order of the original candidates.
2019-10-18Support DidYouMean by AmbiguousOption tooNobuyoshi Nakada
2019-10-18Defer adding additional info until getting the message of an errorNobuyoshi Nakada
2019-10-18Use DidYouMean.formatterNobuyoshi Nakada
Instead of building messages separately.
2019-10-18lib/optparse.rb: Show a did_you_mean hint for unknown optionYusuke Endoh
``` require 'optparse' OptionParser.new do |opts| opts.on("-f", "--foo", "foo") {|v| } opts.on("-b", "--bar", "bar") {|v| } opts.on("-c", "--baz", "baz") {|v| } end.parse! ``` ``` $ ruby test.rb --baa Traceback (most recent call last): test.rb:7:in `<main>': invalid option: --baa (OptionParser::InvalidOption) Did you mean? baz bar ``` Notes: Merged: https://github.com/ruby/ruby/pull/2561
2019-07-07Fix default argument values for OptParse::Switch#summarizeJeremy Evans
The documentation describes these arguments being hashes, and the method is called with hashes, so a hash default makes more sense. The method would fail previously if called without arguments and @short or @long contained a non-integer value. Fixes [Bug #10928]
2019-05-06Load OptionParser defaults from XDG and Haiku standardsNobuyoshi Nakada
2018-12-04Use delete_prefix instead of `sub(/\Afixed-pattern/, '')`kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-02optarse.rb: mention multiple descriptions [ci skip]nobu
[ruby-list:50718] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e