ruby/test/optparse
nobu 2ad7fb6dc1 optparse: Suppress warnings
Ruby warns "instance variable `@version` not initialized" for optparse when it receives `--version` option.

`test.rb`

```ruby
require 'optparse'
Version = '1'
OptionParser.new.parse(ARGV)
```

```
$ ruby -w test.rb --version
/home/pocke/.rbenv/versions/2.5.1/lib/ruby/2.5.0/optparse.rb:1168: warning: instance variable @version not initialized
/home/pocke/.rbenv/versions/2.5.1/lib/ruby/2.5.0/optparse.rb:1175: warning: instance variable @release not initialized
test 1
```

This change will suppress the warnings.

[Fix GH-1871]

From: Masataka Pocke Kuwabara <kuwabara@pocke.me>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-06 09:53:33 +00:00
..
test_acceptable.rb optparse.rb: get rid of eval 2017-07-12 02:49:53 +00:00
test_autoconf.rb multiple arguments to write 2017-10-23 14:05:07 +00:00
test_bash_completion.rb optparse.rb: case-sensitive candidate 2017-07-24 01:56:04 +00:00
test_cclass.rb optparse.rb: fix char class option 2016-05-31 08:28:48 +00:00
test_getopts.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00
test_kwargs.rb multiple arguments to write 2017-10-23 14:05:07 +00:00
test_noarg.rb optparse.rb: hyphenize 2016-10-14 08:20:26 +00:00
test_optarg.rb optparse.rb: hyphenize 2016-10-14 08:20:26 +00:00
test_optparse.rb multiple arguments to write 2017-10-23 14:05:07 +00:00
test_placearg.rb optparse.rb: hyphenize 2016-10-14 08:20:26 +00:00
test_reqarg.rb optparse.rb: hyphenize 2016-10-14 08:20:26 +00:00
test_summary.rb optparse: Suppress warnings 2018-05-06 09:53:33 +00:00
test_zsh_completion.rb Add frozen_string_literal: false for all files 2015-12-16 05:07:31 +00:00