* 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:
parent
17248a467e
commit
8fefe64adc
@ -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>
|
Thu May 29 22:29:39 2008 Yusuke Endoh <mame@tsg.ne.jp>
|
||||||
|
|
||||||
* io.c (argf_external_encoding, argf_internal_encoding): fix SEGV by
|
* io.c (argf_external_encoding, argf_internal_encoding): fix SEGV by
|
||||||
|
2
io.c
2
io.c
@ -7193,7 +7193,7 @@ argf_readchar(VALUE argf)
|
|||||||
VALUE ch;
|
VALUE ch;
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
if (!next_argv()) return Qnil;
|
if (!next_argv()) return rb_eof_error();
|
||||||
if (TYPE(current_file) != T_FILE) {
|
if (TYPE(current_file) != T_FILE) {
|
||||||
ch = rb_funcall3(current_file, rb_intern("getc"), 0, 0);
|
ch = rb_funcall3(current_file, rb_intern("getc"), 0, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user