tags 345495 + confirmed
tags 345495 + patch
forwarded 345495 [EMAIL PROTECTED]
thanks 

hi Rakesh, hi list,

On Sun, Jan 01, 2006 at 11:17:12AM +0530, Rakesh 'arky' Ambati wrote:
> Found this when doing a bit of monkey testing, don't know if this really is a
> problem or just normal behavior in ruby. Anyway am filling it anyway for
> information purpose only. 
> 
> $ raggle --server --v
> /usr/bin/raggle: option `--v' is ambiguous
> /usr/lib/ruby/1.8/getoptlong.rb:265:in `set_error': option `--v' is ambiguous 
> (G
> etoptLong::AmbigousOption)
>         from /usr/lib/ruby/1.8/getoptlong.rb:362:in `get_option'
>         from /usr/lib/ruby/1.8/getoptlong.rb:458:in `each'
>         from /usr/lib/ruby/1.8/getoptlong.rb:457:in `each'
>         from /usr/bin/raggle:1993:in `parse_cli_options'
>         from /usr/bin/raggle:4756:in `load_config'
>         from /usr/bin/raggle:5441:in `main'
>         from /usr/bin/raggle:6461

well, theres no rescue handler for cases in which ambigous options are
specified so raggle bails out in the standard ruby way. Attached patch fixes
this and makes raggle exit in a nicer way. Happy new year :)

bye,
    - michael
--- /usr/bin/raggle     2005-12-15 18:24:53.000000000 +0100
+++ raggle      2006-01-01 13:00:37.000000000 +0100
@@ -2079,6 +2079,8 @@
         end
       rescue GetoptLong::InvalidOption 
         exit(-1)
+      rescue GetoptLong::AmbigousOption
+        exit(-1)
       end
     
            

Attachment: signature.asc
Description: Digital signature

Reply via email to