From 031c46f83a0b64e6accde30b2a4b92c6d21650e0 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 8 Feb 2015 15:26:11 +0000 Subject: optparse.rb: update --version example [ci skip] * lib/optparse.rb (OptparseExample): [DOC] update example code for --version option, to print OptparseExample::Version. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/optparse.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/optparse.rb b/lib/optparse.rb index 992dd8b28a..b83938bbc7 100644 --- a/lib/optparse.rb +++ b/lib/optparse.rb @@ -243,6 +243,8 @@ # require 'pp' # # class OptparseExample +# Version = '1.0.0' +# # CODES = %w[iso-2022-jp shift_jis euc-jp utf8 binary] # CODE_ALIASES = { "jis" => "iso-2022-jp", "sjis" => "shift_jis" } # @@ -298,7 +300,7 @@ # end # # Another typical switch to print the version. # parser.on_tail("--version", "Show version") do -# puts ::Version.join('.') +# puts Version # exit # end # end -- cgit v1.2.3