```
$ make test-all TESTS=test/optparse/
...
[148/178] TestOptionParserDidYouMean#test_raise_unknown = 0.00 s
1) Failure:
TestOptionParserDidYouMean#test_raise_unknown [/home/mame/work/ruby/test/optparse/test_optparse.rb:106]:
<["--bar"]> expected but was
<[]>.
```
In the old test/unit (bundled in ruby/ruby), when a test class inherits from
another test class, the child class runs all the tests defined in the parent
class.
However, it looks like the new test/unit does not do so. This is because the
test failure does not occur in ruby/optparse.
As a tentative solution, this changes the option names in TestOptionParser to
avoid the name conflict with TestOptionParserDidYouMean.
https://github.com/ruby/optparse/commit/fee86ef7a4
Make write methods of IO-like objects accept multiple arguments,
as well as IO#write.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/optparse.rb (candidate): short options are case-sensitive by
the default, should not match case-different options..
https://github.com/mernen/completion-ruby/pull/9#issuecomment-317287946
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/optparse.rb: try Float() and Integer() instead of eval,
which does too much things.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Previously if the input started with a '0' then it will be converted
as octal even though it has been specified as a decimal. This commit
forces the number to be interpreted as a decimal.
[ruby-core:81927] [Bug #13722] [Fix GH-1665]
Author: william <william.mccumstie@outlook.com>
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/optparse/kwargs.rb (OptionParser#define_by_keywords):
[EXPERIMENTAL] extract command line option definitions from the
information of keyword arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/optparse.rb (OptionParser::Completion.candidate): get rid of
nil as key names. [ruby-core:75773] [Bug #12438]
* lib/optparse.rb (OptionParser#make_switch): char class option
cannot be NoArgument, default to RequiredArgument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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
hexadecimal numbers per the documentation. [ruby-trunk - Bug #8865]
DecimalInteger, OctalInteger, DecimalNumeric now validate their input
before converting to a number. [ruby-trunk - Bug #8865]
* test/optparse/test_acceptable.rb: Tests for the above, tests for all
numeric acceptables for existing behavior.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/optparse/test_optparse.rb (TestOptionParser#assert_no_error):
prefix with assert_ so it will be skipped in backtrace.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
test for r35467. OptionParser#to_a shouldn't split banner by spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e