nobu.nokada / softhome.net wrote:

>AFAIK, GetoptLong never eat non-option arguments regardless
>ordering mode.
>
Well with Ruby 1.6.6 it does.  If I have XXXX -c -a and the GetoptLong 
is set to only understand -c, then -a gets eaten.

>What about this?
>
(snipped elegant solution - but one that still doesn't quite do what the 
perl code does.  :<)
Thanks for the message and code!
Unfortunately this solution will require the users to enter 'global' 
options before the "command" (always), but at this point I think it's 
something I may have to live with.
*sigh*

Thanks for all the messages everybody.  Hopefully my plight has pointed 
out some of the deficiencies in the GetoptLong class.
Raising exceptions and eating arguments for one thing is bad, bad, bad - 
it could at least be a gentleman about it and tell us [via the exception 
class] what it just ate!
Anyway, perhaps once my Ruby skills improve, I'll create a new version 
that is more flexible and send it out.