N
Nexos
Hi all,
I'm using getopt-declare and encounter an inexplicable problem in the
following code:
require 'Getopt/Declare'
$config = Hash.new
args = Getopt:eclare.new(%q§
[strict]
-d <delim> use <delim> as delimitor (single character)
{ reject(delim.length != 1, "delimitor must be a
single character")
$config[:delim] = delim }
-f force output file overwrite
-F <file:if>... process specified files
{ defer { file.each { |i|
puts "Filename = #{i}" } } }
§ )
If I use 'ruby myProg -F toto lulu', I get
Error: unrecognizable argument ('toto')
Error: unrecognizable argument ('lulu')
However, if I swap the -f and -F options, it oddly enough works as
expected.
Note I've used tabs to separate full argument specification from its
description.
Has someone any single clue on what has occured there ?
Thanks in advance,
Frédéric Delanoy
I'm using getopt-declare and encounter an inexplicable problem in the
following code:
require 'Getopt/Declare'
$config = Hash.new
args = Getopt:eclare.new(%q§
[strict]
-d <delim> use <delim> as delimitor (single character)
{ reject(delim.length != 1, "delimitor must be a
single character")
$config[:delim] = delim }
-f force output file overwrite
-F <file:if>... process specified files
{ defer { file.each { |i|
puts "Filename = #{i}" } } }
§ )
If I use 'ruby myProg -F toto lulu', I get
Error: unrecognizable argument ('toto')
Error: unrecognizable argument ('lulu')
However, if I swap the -f and -F options, it oddly enough works as
expected.
Note I've used tabs to separate full argument specification from its
description.
Has someone any single clue on what has occured there ?
Thanks in advance,
Frédéric Delanoy