~ubuntu-branches/ubuntu/intrepid/ruby1.8/intrepid

« back to all changes in this revision

Viewing changes to lib/optparse.rb

  • Committer: Package Import Robot
  • Author(s): Daigo Moriwaki
  • Date: 2008-06-11 21:08:19 UTC
  • mfrom: (1.1.12) (19.1.1 intrepid)
  • Revision ID: package-import@ubuntu.com-20080611210819-s5kz8n2bri5w68av
Tags: 1.8.7.17-1
* New upstream release.
* removed patches that the upstream has included:
  - debian/patches/201_erb_187_release.dpatch
  - debian/patches/202_delegate_187_release.dpatch
  - debian/patches/203_openssl_ctx_r187_release.dpatch
* debian/watch: it will report 1.8.\d-p\d* versions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
#
204
204
class OptionParser
205
205
  # :stopdoc:
206
 
  RCSID = %w$Id: optparse.rb 13823 2007-11-04 20:17:06Z nobu $[1..-1].each {|s| s.freeze}.freeze
 
206
  RCSID = %w$Id: optparse.rb 16857 2008-06-06 08:05:24Z knu $[1..-1].each {|s| s.freeze}.freeze
207
207
  Version = (RCSID[1].split('.').collect {|s| s.to_i}.extend(Comparable).freeze if RCSID[1])
208
208
  LastModified = (Time.gm(*RCSID[2, 2].join('-').scan(/\d+/).collect {|s| s.to_i}) if RCSID[2])
209
209
  Release = RCSID[2]
826
826
  #
827
827
  # Directs to reject specified class argument.
828
828
  #
829
 
  # +t+:: Argument class speficier, any object including Class.
 
829
  # +t+:: Argument class specifier, any object including Class.
830
830
  #
831
831
  #   reject(t)
832
832
  #
1037
1037
  #     "-x[OPTIONAL]"
1038
1038
  #     "-x"
1039
1039
  #   There is also a special form which matches character range (not full
1040
 
  #   set of regural expression):
 
1040
  #   set of regular expression):
1041
1041
  #     "-[a-z]MANDATORY"
1042
1042
  #     "-[a-z][OPTIONAL]" 
1043
1043
  #     "-[a-z]"
1044
1044
  #
1045
1045
  # [Argument style and description:]
1046
 
  #   Instead of specifying mandatory or optional orguments directly in the
 
1046
  #   Instead of specifying mandatory or optional arguments directly in the
1047
1047
  #   switch parameter, this separate parameter can be used.
1048
1048
  #     "=MANDATORY"
1049
1049
  #     "=[OPTIONAL]"