getopt-declare 1.21 → 1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Declare.rdoc CHANGED
@@ -5,8 +5,8 @@
5
5
  #
6
6
  # = VERSION
7
7
  #
8
- # This document describes version 1.21 of Getopt::Declare,
9
- # Released Jan 15, 2007 for Ruby.
8
+ # This document describes version 1.22 of Getopt::Declare,
9
+ # Released Jan 21, 2007 for Ruby.
10
10
  #
11
11
  # Original Perl's Getopt-Declare v1.09, Released May 21, 1999.
12
12
  #
data/HISTORY.txt CHANGED
@@ -1,3 +1,7 @@
1
+ 1.22 - * Fixed some nasty bugs introduced in 1.21, which would cause stack
2
+ traces.
3
+ * Fixed the use of /bin/env in some demos instead of /usr/bin/env.
4
+
1
5
  1.21 - Incorporated Perl fixes done by Damian in v1.10 and v1.11 of the
2
6
  corresponding Getopt-Declare into Ruby.
3
7
 
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ rdoc_files = ["Declare.rdoc", 'HISTORY.txt'] + Dir.glob('lib/*/*.rb')
10
10
  #
11
11
  spec = Gem::Specification.new do |spec|
12
12
  spec.name = "getopt-declare"
13
- spec.version = '1.21'
13
+ spec.version = '1.22'
14
14
  spec.author = "Gonzalo Garramuno"
15
15
  spec.email = 'ggarra@advancedsl.com.ar, GGarramuno@aol.com'
16
16
  spec.homepage = 'http://www.rubyforge.org/projects/getoptdeclare/'
@@ -4,7 +4,7 @@
4
4
  # Ruby port of Perl's Getopt::Declare, version 1.21,
5
5
  # released May 21, 1999.
6
6
  #
7
- # $Release Version: 1.21 $
7
+ # $Release Version: 1.22 $
8
8
  # $Date: 2007/01/15 10:53:09 $
9
9
  # by Gonzalo Garramu�o
10
10
  #
@@ -70,7 +70,7 @@ module Getopt
70
70
  # Main Class
71
71
  class Declare
72
72
 
73
- VERSION = '1.20'
73
+ VERSION = '1.22'
74
74
 
75
75
  # For debugging, use [debug] and it will output the ruby code as .CODE.rb
76
76
  @@debug = false
@@ -519,7 +519,7 @@ EOS
519
519
 
520
520
 
521
521
  @@nextid += 1
522
- @flag = nil
522
+ @flag = ''
523
523
  @foundid = nil
524
524
  @args = []
525
525
  @actions = []
@@ -613,7 +613,7 @@ EOS
613
613
  nocasei = ((Getopt::Declare::nocase || @nocase) ? 'i' : '')
614
614
 
615
615
  code << " catch(:paramout) do\n"
616
- code += !@repeatable? " while !_FOUND_['" + @foundid + "']" :
616
+ code += !@repeatable? " while !_FOUND_['" + self.foundid + "']" :
617
617
  " while 1"
618
618
  if (flag && (clump==1 && flag !~ /\A[^a-z0-9]+[a-z0-9]\Z/i ||
619
619
  (clump<3 && @args )))
@@ -741,7 +741,7 @@ EOS
741
741
 
742
742
  # Return name of argument, which can be flag's name or variable's name
743
743
  def name
744
- return @flag || "<#{@args[0].name}>"
744
+ return ( @flag.empty? ? "<#{@args[0].name}>" : @flag )
745
745
  end
746
746
 
747
747
  # Return foundid of argument, which can be flag's name or variable's name
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
data/samples/demo_csv.rb CHANGED
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
@@ -1,4 +1,4 @@
1
- #!/bin/env ruby
1
+ #!/usr/bin/env ruby
2
2
 
3
3
  require "Getopt/Declare"
4
4
 
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
2
+ rubygems_version: 0.9.1
3
3
  specification_version: 1
4
4
  name: getopt-declare
5
5
  version: !ruby/object:Gem::Version
6
- version: "1.21"
7
- date: 2007-01-17 00:00:00 -03:00
6
+ version: "1.22"
7
+ date: 2007-01-21 00:00:00 -03:00
8
8
  summary: Getopt-Declare is a command-line argument parser.
9
9
  require_paths:
10
10
  - lib