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 aacccd4e13..dc7ea4221c 100644
--- a/io.c
+++ b/io.c
@@ -2182,7 +2182,7 @@ rb_f_gets_internal(argc, argv)
retry:
if (!next_argv()) return Qnil;
- if (rb_rs == rb_default_rs) {
+ if (argc == 0 && rb_rs == rb_default_rs) {
line = rb_io_gets(file);
}
else {