зеркало из https://github.com/github/ruby.git
optparse.rb: remove $Id$
* lib/optparse.rb (OptionParser): remove constants depending on $Id$. [Bug #8877] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
3fa0edda05
Коммит
d1f2021b07
|
@ -185,7 +185,7 @@
|
|||
#
|
||||
# # 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 @@
|
|||
#
|
||||
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
|
|||
|
||||
# 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
|
||||
|
|
Загрузка…
Ссылка в новой задаче