summaryrefslogtreecommitdiff
path: root/lib/optparse.rb
AgeCommit message (Collapse)Author
2025-12-10[ruby/optparse] v0.8.1Hiroshi SHIBATA
https://github.com/ruby/optparse/commit/f2e31e81a5
2025-12-02[ruby/optparse] Remove `const_set` and instead use explicit assignmentsSam Westerman
https://github.com/ruby/optparse/commit/6e2709a5fd
2025-11-26[ruby/optparse] Remove unneeded `public`Sam Westerman
Removed public visibility from the candidate method. https://github.com/ruby/optparse/commit/9a784a89a2
2025-11-26[ruby/optparse] Put `private` before method declarationsSam Westerman
https://github.com/ruby/optparse/commit/5478354d4f
2025-11-09[ruby/optparse] [DOC] A constant for compatibilityNobuyoshi Nakada
https://github.com/ruby/optparse/commit/0125cb4918
2025-10-31[ruby/optparse] Bump up to v0.8.0Hiroshi SHIBATA
v0.8.0 is mistake of release workflow. This version is same as v0.7.0 https://github.com/ruby/optparse/commit/9a467d10d4
2025-10-31[ruby/optparse] Bump up v0.7.0Hiroshi SHIBATA
https://github.com/ruby/optparse/commit/a394ca4878
2025-10-31[ruby/optparse] We should use VERSION instead of Version constantHiroshi SHIBATA
https://github.com/ruby/optparse/commit/94de48b47e
2025-09-15[ruby/optparse] Prefer `Proc` over `Method`Nobuyoshi Nakada
The performances are: block > proc > method object. https://github.com/ruby/optparse/commit/9ec5d1d582
2025-08-08[ruby/optparse] Use `~/.config` only if `$XDG_CONFIG_HOME` is unset or emptyNobuyoshi Nakada
https://github.com/ruby/optparse/commit/2f9c7500a3
2025-08-03[ruby/optparse] Expand literal home paths onlyNobuyoshi Nakada
Paths in environment variables should already be expanded. The base name of the program is also not subject to expansion. https://github.com/ruby/optparse/commit/181752391c
2025-06-29[ruby/optparse] JRuby does not have EXECUTABLE_EXTS in RbConfg::CONFIGNobuyoshi Nakada
https://github.com/ruby/optparse/commit/15b2f00b6b
2025-06-29[ruby/optparse] Fix OptionParser#program_name not to strip suffix unexpectedlyNobuyoshi Nakada
https://github.com/ruby/optparse/commit/740ffa76c0
2025-06-29[ruby/optparse] Enhance to support 'Set' object as an enumkwatch
(https://github.com/ruby/optparse/pull/76) * Enhance to support 'Set' object as an enum * Add test script for '#make_swithc()' --------- https://github.com/ruby/optparse/commit/3869000e98 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2025-03-19[ruby/optparse] bump up to 0.7.0.dev.2Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/8c2c7a4903
2025-03-17[ruby/optparse] Fix completion of key-value pairs arrayNobuyoshi Nakada
Enum array may be the list of pairs of key and value. Check if only key is completable, not pair. Fix https://github.com/ruby/optparse/pull/93 Fix https://github.com/ruby/optparse/pull/94 https://github.com/ruby/optparse/commit/a8d0ba8dac
2025-03-10[ruby/optparse] bump up to 0.7.0.dev.1 [ci skip]Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/f4d64b0b17
2025-03-10[ruby/optparse] Fix LESS environment variable setup in OptionParser#help_exitKouhei Yanagita
If the original value of LESS ends with an option starting with "--", simply appending "Fe" would result in an invalid option string. https://github.com/ruby/optparse/commit/30571f91d3
2025-03-10[ruby/optparse] Make the result of `tty?` obtainable with flexible stdoutKoichi ITO
In mock testing for stdout, `StringIO.new` is sometimes used to redirect the output. In such cases, the assignment is done with `$stdout = StringIO.new`, not the constant `STDOUT`. e.g., https://github.com/rubocop/rubocop/blob/v1.71.1/lib/rubocop/rspec/shared_contexts.rb#L154-L164 After assigning `StringIO.new`, `$stdout.tty?` returns `false`, allowing the standard output destination to be switched during test execution. ```ruby STDOUT.tty? # => true StringIO.new.tty? # => false ``` However, since `STDOUT.tty?` returns `true`, a failure occurred in environments where the environment variables `RUBY_PAGER` or `PAGER` are set. e.g., https://github.com/rubocop/rubocop/pull/13784 To address this, `STDOUT` has been updated to `$stdout` so that the result of `tty?` can be flexibly overridden. A potential concern is that `$stdout`, unlike `STDOUT`, does not always represent the standard output at the time the Ruby process started. However, no concrete examples of issues related to this have been identified. `STDOUT.tty?` is the logic of optparse introduced in https://github.com/ruby/optparse/pull/70. This PR replaces `STDOUT` with `$stdout` throughout, based on the assumption that `$stdout` is sufficient for use with optparse. https://github.com/ruby/optparse/commit/262cf6f9ac
2025-03-10[ruby/optparse] Add post-check of valueNobuyoshi Nakada
Fix https://github.com/ruby/optparse/pull/80 https://github.com/ruby/optparse/commit/050a87d029
2025-03-10[ruby/optparse] Update argument check with save navigation operatorNobuyoshi Nakada
https://github.com/ruby/optparse/commit/71e2b31824
2025-03-10[ruby/optparse] Remove extra blank lines [ci skip]Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/d7dec6808f
2025-03-10[ruby/optparse] [DOC] Update documents to use single quotes instead of ↵Nobuyoshi Nakada
backqoutes https://github.com/ruby/optparse/commit/5e71a70cb5
2025-03-09[ruby/optparse] Allow non-string enum list #79Nobuyoshi Nakada
Command line arguments are strings, convert enum list elements to strings to match. https://github.com/ruby/optparse/commit/c5ec052efc
2025-03-09[ruby/optparse] Use `\A` instead of `^` as the beginning of stringNobuyoshi Nakada
https://github.com/ruby/optparse/commit/a3f1029815
2024-11-08[ruby/optparse] Bump up v0.6.0Hiroshi SHIBATA
https://github.com/ruby/optparse/commit/080360ffd4
2024-09-03[ruby/optparse] Prefer `require_relative`Nobuyoshi Nakada
https://github.com/ruby/optparse/commit/bb08cd47a8
2024-08-05[ruby/optparse] Fix parsing array arguments with `:into` optionfatkodima
https://github.com/ruby/optparse/commit/19700e96d8
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