summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-08 15:26:11 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-08 15:26:11 +0000
commit031c46f83a0b64e6accde30b2a4b92c6d21650e0 (patch)
tree07f6845e05e6b88e7d62ea471942f3dc846e2819
parent37d346dc83217ea8854dc17d29477be539d8473d (diff)
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
-rw-r--r--lib/optparse.rb4
1 files changed, 3 insertions, 1 deletions
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