[#2529] concerns about Proc,lambda,block — "David A. Black" <dblack@...>

Hi --

39 messages 2004/03/01
[#2531] Re: concerns about Proc,lambda,block — ts <decoux@...> 2004/03/01

>>>>> "D" == David A Black <dblack@wobblini.net> writes:

[#2533] Re: concerns about Proc,lambda,block — "David A. Black" <dblack@...> 2004/03/01

Hi --

[#2537] Re: concerns about Proc,lambda,block — matz@... (Yukihiro Matsumoto) 2004/03/01

Hi,

[#2542] Re: concerns about Proc,lambda,block — Mathieu Bouchard <matju@...> 2004/03/02

[#2545] Re: concerns about Proc,lambda,block — matz@... (Yukihiro Matsumoto) 2004/03/02

Hi,

[#2550] Re: concerns about Proc,lambda,block — Mauricio Fern疣dez <batsman.geo@...> 2004/03/03

On Wed, Mar 03, 2004 at 07:51:10AM +0900, Yukihiro Matsumoto wrote:

[#2703] Proposed patch to add SSL support to net/pop.rb — Daniel Hobe <daniel@...>

This patch adds support to Net::POP for doing POP over SSL. Modeled on how

19 messages 2004/03/27
[#2704] Re: Proposed patch to add SSL support to net/pop.rb — Daniel Hobe <daniel@...> 2004/03/27

This is v2 of the patch. Cleaned up a bit and added some more docs.

[#2707] Re: Proposed patch to add SSL support to net/pop.rb — Daniel Hobe <daniel@...> 2004/03/28

v3 of the patch:

[#2721] Re: Proposed patch to add SSL support to net/pop.rb — Minero Aoki <aamine@...> 2004/03/30

Hi,

getoptlong.rb improvements

From: Elliott Hughes <ehughes@...>
Date: 2004-03-03 23:30:24 UTC
List: ruby-core #2559
The exception "AmbiguousOption" is misspelled, "quit mode" should read
"quiet mode", and the ambiguous option exception's detail string would be a
lot more useful if it actually said what options the ambiguity was between.

  --elliott

Index: lib/getoptlong.rb
===================================================================
RCS file: /src/ruby/lib/getoptlong.rb,v
retrieving revision 1.10
diff -u -r1.10 getoptlong.rb
--- lib/getoptlong.rb   2 Jun 2003 04:49:46 -0000       1.10
+++ lib/getoptlong.rb   3 Mar 2004 23:24:33 -0000
@@ -34,7 +34,7 @@
   # Error types.
   #
   class Error  < StandardError; end
-  class AmbigousOption   < Error; end
+  class AmbiguousOption   < Error; end
   class NeedlessArgument < Error; end
   class MissingArgument  < Error; end
   class InvalidOption    < Error; end
@@ -208,7 +208,7 @@
   end
 
   #
-  # Set/Unset `quit' mode.
+  # Set/Unset `quiet' mode.
   #
   attr_writer :quiet
 
@@ -352,15 +352,16 @@
        # It may be an abbreviated.
        #
        match_count = 0
+    matches = []
        @canonical_names.each_key do |key|
          if key.index(pattern) == 0
            option_name = key
-           match_count += 1
+        matches << key
          end
        end
-       if 2 <= match_count
-         set_error(AmbigousOption, "option `#{argument}' is ambiguous")
-       elsif match_count == 0
+       if 2 <= matches.length()
+         set_error(AmbiguousOption, "option `#{argument}' is ambiguous
between #{matches.join(', ')}")
+       elsif matches.length() == 0
          set_error(InvalidOption, "unrecognized option `#{argument}'")
        end
       end


*********************************************************************
This e-mail and any attachment is confidential. It may only be read, copied and used by the intended recipient(s). If you are not the intended recipient(s), you may not copy, use, distribute, forward, store or disclose this e-mail or any attachment. If you are not the intended recipient(s) or have otherwise received this e-mail in error, you should destroy it and any attachment and notify the sender by reply e-mail or send a message to sysadmin@bluearc.com
*********************************************************************


In This Thread

Prev Next