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

ruby-changes:30810

From: nobu <ko1@a...>
Date: Sun, 8 Sep 2013 21:37:33 +0900 (JST)
Subject: [ruby-changes:30810] nobu:r42889 (trunk): optparse.rb: remove $Id$

nobu	2013-09-08 21:37:29 +0900 (Sun, 08 Sep 2013)

  New Revision: 42889

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

  Log:
    optparse.rb: remove $Id$
    
    * lib/optparse.rb (OptionParser): remove constants depending on $Id$.
      [Bug #8877]

  Modified files:
    trunk/lib/optparse.rb
Index: lib/optparse.rb
===================================================================
--- lib/optparse.rb	(revision 42888)
+++ lib/optparse.rb	(revision 42889)
@@ -185,7 +185,7 @@ https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L185
 #
 #         # Another typical switch to print the version.
 #         opts.on_tail("--version", "Show version") do
-#           puts OptionParser::Version.join('.')
+#           puts ::Version.join('.')
 #           exit
 #         end
 #       end
@@ -212,11 +212,6 @@ https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L212
 #
 class OptionParser
   # :stopdoc:
-  RCSID = %w$Id$[1..-1].each {|s| s.freeze}.freeze
-  Version = (RCSID[1].split('.').collect {|s| s.to_i}.extend(Comparable).freeze if RCSID[1])
-  LastModified = (Time.gm(*RCSID[2, 2].join('-').scan(/\d+/).collect {|s| s.to_i}) if RCSID[2])
-  Release = RCSID[2]
-
   NoArgument = [NO_ARGUMENT = :NONE, nil].freeze
   RequiredArgument = [REQUIRED_ARGUMENT = :REQUIRED, true].freeze
   OptionalArgument = [OPTIONAL_ARGUMENT = :OPTIONAL, false].freeze
@@ -1959,10 +1954,3 @@ end https://github.com/ruby/ruby/blob/trunk/lib/optparse.rb#L1954
 
 # ARGV is arguable by OptionParser
 ARGV.extend(OptionParser::Arguable)
-
-if $0 == __FILE__
-  Version = OptionParser::Version # :nodoc:
-  ARGV.options {|q|
-    q.parse!.empty? or print "what's #{ARGV.join(' ')}?\n"
-  } or abort(ARGV.options.to_s)
-end

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

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