From ce0264b6f5dc41325abfd0b40abe6d8ad69976db Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 21 Feb 2008 05:49:42 +0000 Subject: * io.c (argf_set_encoding): uses current_file after check if next input is available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'io.c') 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); -- cgit v1.2.3