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:
parent
17248a467e
commit
8fefe64adc
2 changed files with 5 additions and 1 deletions
|
@ -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
2
io.c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue