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 c17fc9e93f..61cfa97b83 100644
--- a/io.c
+++ b/io.c
@@ -6103,7 +6103,7 @@ argf_set_encoding(int argc, VALUE *argv, VALUE io)
{
rb_io_t *fptr;
- if (next_argv()) {
+ if (!next_argv()) {
rb_raise(rb_eArgError, "no stream to set encoding");
}
rb_io_set_encoding(argc, argv, current_file);