diff options
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -836,7 +836,7 @@ io_read(argc, argv, io) if (n == 0) { rb_str_resize(str,0); if (feof(fptr->f)) return Qnil; - rb_sys_fail(fptr->path); + if (len > 0) rb_sys_fail(fptr->path); } RSTRING(str)->len = n; RSTRING(str)->ptr[n] = '\0'; |