зеркало из https://github.com/github/ruby.git
2ad7fb6dc1
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 |
||
---|---|---|
.. | ||
test_acceptable.rb | ||
test_autoconf.rb | ||
test_bash_completion.rb | ||
test_cclass.rb | ||
test_getopts.rb | ||
test_kwargs.rb | ||
test_noarg.rb | ||
test_optarg.rb | ||
test_optparse.rb | ||
test_placearg.rb | ||
test_reqarg.rb | ||
test_summary.rb | ||
test_zsh_completion.rb |