diff options
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -459,7 +459,11 @@ io_gets_method(argc, argv, io) if (!NIL_P(rs)) Check_Type(rs, T_STRING); } - if (!NIL_P(rs)) { + if (NIL_P(rs)) { + rsptr = 0; + rslen = 0; + } + else { rslen = RSTRING(rs)->len; if (rslen == 0) { rsptr = "\n\n"; @@ -473,10 +477,6 @@ io_gets_method(argc, argv, io) rsptr = RSTRING(rs)->ptr; } } - else { - rsptr = 0; - rslen = 0; - } GetOpenFile(io, fptr); io_readable(fptr); |