From: Levin Alexander Date: 2005-06-25T13:53:17+09:00 Subject: Re: [ANN] Application-0.6.0 Jim Freeze wrote: > CommandLine - Application and OptionParser > ========================================== Great! However, arguments with options do not seem to work correctly $ cat testapp.rb #!/usr/bin/env ruby require 'rubygems' require 'commandline' # A minimum application class App < CommandLine::Application def initialize option :debug, :arity => [1,1], :opt_description => "Set debug level from 0 to 9" args :file1, :file2 super end end #class App $ ./testapp.rb --debug 2 file1 file2 Exception `CommandLine::Application::ArgumentError' at /usr/lib/ruby/gems/1.8/gems/CommandLine-0.6.0/lib/commandline/application.rb:87 - Too many arguments. Found 3 but expected 2. Usage: testapp.rb ERROR: Too many arguments. Found 3 but expected 2. Usage: testapp.rb -- -Levin