summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-03-12 01:15:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-03-12 01:15:17 +0000
commit1acc981a539813e6ec2a5c50f3d91f946a4da1a6 (patch)
treec7e7434c001d81701f583a30b5e10c51390e51e2 /io.c
parent600d59db733b266a706bf74c4f2083cf7940e471 (diff)
speed up patch 4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/io.c b/io.c
index a52cea488b..751a5ef393 100644
--- a/io.c
+++ b/io.c
@@ -442,11 +442,9 @@ io_gets_method(argc, argv, io)
c = cnt ? 0 : EOF;
}
- if (c == EOF) {
- if (!append && cnt == 0) {
- str = Qnil;
- goto return_gets;
- }
+ if (c == EOF && !append && cnt == 0) {
+ str = Qnil;
+ goto return_gets;
}
if (append)
@@ -517,11 +515,9 @@ io_gets(io)
}
cnt = bp - buf;
- if (c == EOF) {
- if (!append && cnt == 0) {
- str = Qnil;
- goto return_gets;
- }
+ if (c == EOF && !append && cnt == 0) {
+ str = Qnil;
+ goto return_gets;
}
if (append)