ye gods,

I'm trying to learn my 1st OO lang and chose ruby.  I've already
got a couple of simple batch processing programs written and
functioning but CommandLine is kicking my butt.

As I read the docs 'program -a -b' can be called with 'program -ab',
setting flags a & b in either case.  I get an Unknown option error.

I cut this example directly from:
/usr/lib/ruby/gems/1.8/gems/commandline-0.7.10/docs/posted-docs.index.html

#!/usr/bin/env ruby

require 'rubygems'
require 'commandline'

class App < CommandLine::Application
  def initialize
      options :help, :debug
   end

  def main
      puts "call your library here"
  end
end#class App

Then added :verbose to options (options :help, :debug, :version).

My results:

% ruby example.rb -d -v
call your library here

% ruby example.rb -dv
Unknown option '-dv'.

 Usage: example.rb

% _

I've read everything I can find and tried a dozen different
permutations on the theme, including :posix instead of :flag.
I'm sure I'm overlooking something basic due to newbie-myopia.
Any advice?

pb

-- 
Posted via http://www.ruby-forum.com/.