diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-21 05:49:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-21 05:49:42 +0000 |
commit | ce0264b6f5dc41325abfd0b40abe6d8ad69976db (patch) | |
tree | ea2538b66676615c3bea6798deef47b4739f7da4 /io.c | |
parent | 7f2ca5ba7a5afd95354d7ea9a39741cebff38e70 (diff) | |
download | ruby-ce0264b6f5dc41325abfd0b40abe6d8ad69976db.tar.gz |
* 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
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |