Was running the optparse test program with 4 arguments (opttest.rb) under cygwin when it seg faulted. I have included the output of two different cygwin boxes (one at home, one work), both versions of Ruby are HEAD though a couple of days apart. Tried to get a strack trace, but when I recompiled ruby without the CFLAG O2, the problem disappeared.

robertm@PC126 ~/rubysource/sample/optparse
$ ruby opttest.rb 1 2 3
#<Object:0x10109480 @exec=true>
ARGV = 1 2 3

robertm@PC126 ~/rubysource/sample/optparse
$ ruby opttest.rb 1 2 3 4
/usr/local/lib/ruby/1.9/optparse.rb:1382: [BUG] Segmentation fault
ruby 1.9.0 (2004-07-06) [i386-cygwin]

Aborted (core dumped)

robertm@PC126 ~/rubysource/sample/optparse
$ ruby opttest.rb 1 2 3 4 5
#<Object:0x10109480 @exec=true>
ARGV = 1 2 3 4 5

On a different Cygwin box it fails with 5 arguments but is fine with 4 and 6

robertm@al ~/ruby/sample/optparse
$ ruby opttest.rb 1 2 3
#<Object:0x10109480 @exec=true>
ARGV = 1 2 3

robertm@al ~/ruby/sample/optparse
$ ruby opttest.rb 1 2 3 4
#<Object:0x10109480 @exec=true>
ARGV = 1 2 3 4

robertm@al ~/ruby/sample/optparse
$ ruby opttest.rb 1 2 3 4 5
/usr/local/lib/ruby/1.9/optparse.rb:1382: [BUG] Segmentation fault
ruby 1.9.0 (2004-07-10) [i386-cygwin]

Aborted (core dumped)

robertm@al ~/ruby/sample/optparse
$ ruby opttest.rb 1 2 3 4 5 6
#<Object:0x10109480 @exec=true>
ARGV = 1 2 3 4 5 6

Initial backtrace yields nothing useful:

$ gdb ruby
GNU gdb 2003-09-20-cvs (cygwin-special)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...
(gdb) run opttest.rb 1 2 3 4
Starting program: /usr/local/bin/ruby.exe opttest.rb 1 2 3 4

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? () from 
(gdb) bt
#0  0x00000000 in ?? () from 

Recompiled ruby without the O2 optimization and tried again

(gdb) run opttest.rb 1 2 3 4                                           
Starting program: /usr/local/bin/ruby.exe opttest.rb 1 2 3 4
#<Object:0x1011b9d8 @exec=true>
ARGV = 1 2 3 4

Program exited normally.

Anyone else verify?

Thanks

Rob