with ruby-1.8.0.pre3 (or whatever was in the cvs tonight) :



File.open("/dev/zero").read(1<<24,"").length
(eval):1: [BUG] Segmentation fault
ruby 1.8.0 (2003-01-02) [i586-linux]
Abandon (core dumped)



cvs diff io.c 
Index: io.c
===================================================================
RCS file: /src/ruby/io.c,v
retrieving revision 1.175
diff -u -r1.175 io.c
--- io.c        21 Dec 2002 18:02:00 -0000      1.175
+++ io.c        2 Jan 2003 04:55:08 -0000
@@ -829,6 +829,9 @@
            rb_str_resize(str, 0);
            return str;
        }
+       if (len > RSTRING(str)->len) {
+           rb_str_resize(str,len);
+       }
     }
 
     READ_CHECK(fptr->f);



________________________________________________________________
Mathieu Bouchard                       http://artengine.ca/matju