summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-03-13 09:04:32 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-03-13 09:04:32 +0000
commit056f219ecaa8daa50a77d28bed49fb5a4bf75928 (patch)
tree331b0dad1cf037e44c5fd9841d02145a86d3494c /io.c
parent107ead2b961452a8df2d0b63eda34b45d9b4ef75 (diff)
1.1b9_02
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/io.c b/io.c
index 751a5ef393..4e3f60c982 100644
--- a/io.c
+++ b/io.c
@@ -369,7 +369,7 @@ io_gets_method(argc, argv, io)
VALUE rs;
if (argc == 0) {
- return io_gets(io);
+ rs = RS;
}
else {
rb_scan_args(argc, argv, "1", &rs);
@@ -394,7 +394,6 @@ io_gets_method(argc, argv, io)
rsptr = 0;
rslen = 0;
}
- newline = rslen ? rsptr[rslen - 1] : 0777;
GetOpenFile(io, fptr);
io_readable(fptr);
@@ -413,6 +412,7 @@ io_gets_method(argc, argv, io)
} while (c != EOF);
}
+ newline = rslen ? rsptr[rslen - 1] : 0777;
{
char buf[8192];
char *bp, *bpe = buf + sizeof buf - 3;