In article <1072782020.933561.24132.nullmailer / picachu.netlab.jp>,
  matz / ruby-lang.org (Yukihiro Matsumoto) writes:

> いいえ、[ruby-dev:22458],[ruby-dev:22459],[ruby-dev:22460]
> 直したパッチは以下のようになります。試してみてください。

試してみると、次のように core を吐くようになりました。

% echo -n a > 1
% ruby -e 'p ARGF.read' 1 1
zsh: segmentation fault (core dumped)  ruby -e 'p ARGF.read' 1 1
% gdb =ruby core           
GNU gdb 5.3-debian
Copyright 2002 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 "i386-linux"...
Core was generated by `ruby -e p ARGF.read 1 1'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
#0  0x08075b45 in argf_read (argc=0, argv=0x0) at io.c:4943
4943        if (NIL_P(tmp) || NIL_P(argv[0])) {
(gdb) p tmp
$1 = 1075569416
(gdb) p argv
$2 = (VALUE *) 0x0
(gdb) where
#0  0x08075b45 in argf_read (argc=0, argv=0x0) at io.c:4943
#1  0x0805bb6e in rb_call0 (klass=1075593636, recv=1075593656, id=7257, 
    oid=7257, argc=0, argv=0x0, body=0x401c4064, nosuper=0) at eval.c:5354
#2  0x0805c5c6 in rb_call (klass=1075593636, recv=1075593656, mid=7257, 
    argc=0, argv=0x0, scope=0) at eval.c:5703
#3  0x080572bf in rb_eval (self=1075632656, n=0x401be380) at eval.c:3236
#4  0x08057354 in rb_eval (self=1075632656, n=0x401be344) at eval.c:3246
#5  0x08053560 in eval_node (self=1075632656, node=0x401be344) at eval.c:1275
#6  0x08053a2e in ruby_exec () at eval.c:1444
#7  0x08053a8a in ruby_run () at eval.c:1465
#8  0x08051f56 in main (argc=5, argv=0xbffff984, envp=0xbffff99c) at main.c:50
#9  0x40084e3e in __libc_start_main () from /lib/libc.so.6
(gdb) 
-- 
[田中 哲][たなか あきら][Tanaka Akira]