[前][次][番号順一覧][スレッド一覧]

ruby-changes:37466

From: nobu <ko1@a...>
Date: Mon, 9 Feb 2015 00:26:27 +0900 (JST)
Subject: [ruby-changes:37466] nobu:r49547 (trunk): optparse.rb: update --version example [ci skip]

nobu	2015-02-09 00:26:11 +0900 (Mon, 09 Feb 2015)

  New Revision: 49547

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49547

  Log:
    optparse.rb: update --version example [ci skip]
    
    * lib/optparse.rb (OptparseExample): [DOC] update example code for
      --version option, to print OptparseExample::Version.

  Modified files:
    trunk/lib/optparse.rb
Index: lib/optparse.rb
===================================================================
--- lib/optparse.rb	(revision 49546)
+++ lib/optparse.rb	(revision 49547)
@@ -243,6 +243,8 @@ https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L243
 #   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 @@ https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L300
 #         end
 #         # Another typical switch to print the version.
 #         parser.on_tail("--version", "Show version") do
-#           puts ::Version.join('.')
+#           puts Version
 #           exit
 #         end
 #       end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]