summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'io.c')
-rw-r--r--io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io.c b/io.c
index a65a304384..d031625ce4 100644
--- a/io.c
+++ b/io.c
@@ -1723,7 +1723,7 @@ rb_io_getline(rs, io)
while ((c = appendline(fptr, newline, &str)) != EOF &&
(c != newline || RSTRING(str)->len < rslen ||
- (rspara || rscheck(rsptr,rslen,rs), 0) ||
+ ((rspara || rscheck(rsptr,rslen,rs)) && 0) ||
memcmp(RSTRING(str)->ptr+RSTRING(str)->len-rslen,rsptr,rslen)));
if (rspara) {