mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
3fa0edda05
commit
d1f2021b07
1 changed files with 1 additions and 13 deletions
|
@ -185,7 +185,7 @@
|
||||||
#
|
#
|
||||||
# # Another typical switch to print the version.
|
# # Another typical switch to print the version.
|
||||||
# opts.on_tail("--version", "Show version") do
|
# opts.on_tail("--version", "Show version") do
|
||||||
# puts OptionParser::Version.join('.')
|
# puts ::Version.join('.')
|
||||||
# exit
|
# exit
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
|
@ -212,11 +212,6 @@
|
||||||
#
|
#
|
||||||
class OptionParser
|
class OptionParser
|
||||||
# :stopdoc:
|
# :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
|
NoArgument = [NO_ARGUMENT = :NONE, nil].freeze
|
||||||
RequiredArgument = [REQUIRED_ARGUMENT = :REQUIRED, true].freeze
|
RequiredArgument = [REQUIRED_ARGUMENT = :REQUIRED, true].freeze
|
||||||
OptionalArgument = [OPTIONAL_ARGUMENT = :OPTIONAL, false].freeze
|
OptionalArgument = [OPTIONAL_ARGUMENT = :OPTIONAL, false].freeze
|
||||||
|
@ -1959,10 +1954,3 @@ end
|
||||||
|
|
||||||
# ARGV is arguable by OptionParser
|
# ARGV is arguable by OptionParser
|
||||||
ARGV.extend(OptionParser::Arguable)
|
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
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue