1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* io.c (argf_readchar): raise EOFError, synchronizing IO#readchar.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-05-29 13:42:20 +00:00
parent 17248a467e
commit 8fefe64adc
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu May 29 22:41:48 2008 Yusuke Endoh <mame@tsg.ne.jp>
* io.c (argf_readchar): raise EOFError, synchronizing IO#readchar.
Thu May 29 22:29:39 2008 Yusuke Endoh <mame@tsg.ne.jp>
* io.c (argf_external_encoding, argf_internal_encoding): fix SEGV by

2
io.c
View file

@ -7193,7 +7193,7 @@ argf_readchar(VALUE argf)
VALUE ch;
retry:
if (!next_argv()) return Qnil;
if (!next_argv()) return rb_eof_error();
if (TYPE(current_file) != T_FILE) {
ch = rb_funcall3(current_file, rb_intern("getc"), 0, 0);
}