Stefan Lang
3/8/2005 6:02:00 PM
Daniel Berger wrote:
> Hi all,
>
> Ruby 1.8.2
> Solaris 9 and Windows XP Pro
>
> If I have this:
>
> # opt_test.rb
> require "getoptlong"
>
> opts = GetoptLong.new(
> ["--test", "-t", GetoptLong::REQUIRED_ARGUMENT]
> )
Try to insert this:
opts.each { |opt, value|
puts "#{opt} has value #{value}"
}
>
> puts "Done"
>
> And then I run this:
>
>> ruby opt_test.rb
>
> or this:
>
>> ruby opt_test.rb -t
>
> Shouldn't a MissingArgument error be raised in both cases?
>
> Regards,
>
> Dan