diff --git a/ChangeLog b/ChangeLog index 17220f5ae5..8a8ac966ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu May 29 22:41:48 2008 Yusuke Endoh + + * io.c (argf_readchar): raise EOFError, synchronizing IO#readchar. + Thu May 29 22:29:39 2008 Yusuke Endoh * io.c (argf_external_encoding, argf_internal_encoding): fix SEGV by diff --git a/io.c b/io.c index e4a0c21c19..6e7e549dd9 100644 --- a/io.c +++ b/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); }