Nobuyoshi Nakada
8f19f0aad5
[ruby/optparse] Fix completion of key-value pairs array
...
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
a8d0ba8dac
2025-03-17 10:18:49 +00:00
Nobuyoshi Nakada
9e265b583b
[ruby/optparse] Add post-check of value
...
Fix https://github.com/ruby/optparse/pull/80
050a87d029
2025-03-10 09:55:29 +00:00
Nobuyoshi Nakada
cdf36d6bfd
[ruby/optparse] Allow non-string enum list #79
...
Command line arguments are strings, convert enum list elements to
strings to match.
c5ec052efc
2025-03-09 14:32:17 +00:00
Nobuyoshi Nakada
213c27825a
[ruby/optparse] Add test for enum arguments
...
0a0e977b7c
2025-03-09 14:32:17 +00:00
Nobuyoshi Nakada
db73226bf6
[ruby/optparse] Adjust arguments for lambda-callbacks
...
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
213cb03b59
2024-02-09 19:58:31 +09:00
Nobuyoshi Nakada
2c6767b71e
[ruby/optparse] Respect default values in block parameters
...
Fix https://github.com/ruby/optparse/pull/55
9d53e74aa4
2024-02-09 19:58:19 +09:00
konsolebox
419ad1e13e
[ruby/optparse] Also accept '-' as an optional argument ( https://github.com/ruby/optparse/pull/35 )
...
f2b8318631
2022-07-29 19:10:10 +09:00
Jeremy Evans
ab3cb29bd9
Avoid defining the same test class in multiple files
...
Should fix issues with parallel testing sometimes not running all
tests.
This should be viewed skipping whitespace changes.
Fixes [Bug #18731 ]
2022-04-22 15:00:16 -07:00
nobu
99ad512486
optparse.rb: hyphenize
...
* lib/optparse.rb (make_switch, parse_in_order): unify underscores
to hyphens.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-14 08:20:26 +00:00
naruse
3e92b635fb
Add frozen_string_literal: false for all files
...
When you change this to true, you may need to add more tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
nobu
de1e4881d4
* lib/optparse.rb (Regexp): fix incorrect options when casting to
...
a Regexp, and suppress encoding option warnings.
https://github.com/ruby/ruby/pull/82
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34316 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-16 07:42:01 +00:00
akr
48d402db88
use require_relative.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-02 13:58:56 +00:00
nobu
a20f1713c3
* lib/optparse.rb (OptionParser#parse_in_order): do not make an
...
option from non-option argument. [ruby-dev:38333]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-26 06:13:11 +00:00
nobu
4dada1c8a2
* lib/optparse.rb (OptionParser::Switch::PlacedArgument::parse):
...
do not remove next argument if empty value is placed.
* test/optparse: added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-05 10:09:58 +00:00