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 3e623e29b7..ee030e894a 100644
--- a/io.c
+++ b/io.c
@@ -3115,8 +3115,8 @@ rb_f_gets(argc, argv)
{
VALUE line;
+ if (!next_argv()) return Qnil;
if (TYPE(current_file) != T_FILE) {
- if (!next_argv()) return Qnil;
line = rb_funcall3(current_file, rb_intern("gets"), argc, argv);
}
else {