readchar()
public
Reads a character as with IO#getc, but raises an EOFError on end of file.
Show source
/*
* call-seq:
* ios.readchar => fixnum
*
* Reads a character as with <code>IO#getc</code>, but raises an
* <code>EOFError</code> on end of file.
*/
static VALUE
rb_io_readchar(io)
VALUE io;
{
VALUE c = rb_io_getc(io);
if (NIL_P(c)) {
rb_eof_error();
}
return c;
}