わたなべです.

Yukihiro Matsumoto <matz / netlab.co.jp> writes:

:|-      @buffer = @buffer[ len, bsi - len ]
:|+      if bsi - len > 0
:|+	@buffer = @buffer[ len, bsi - len ]
:|+      else
:|+	@buffer = ""
:|+      end
:
:        @buffer = @buffer[ len, bsi - len ] || ""
:
:なんて感じでどうでしょう?

なんかこれって結構ありそう.

--- lib/getopts.rb.orig	Thu Mar 23 17:37:33 2000
+++ lib/getopts.rb	Fri Jun 23 14:20:24 2000
@@ -92,3 +92,3 @@
         elsif single_colon and single_colon_exp === opt then
-          val = arg[ (idx+1)..-1 ]
+          val = arg[ (idx+1)..-1 ] || ""
           if val.empty? then            # ruby -e 'p $:'