chars()
public
Returns an enumerator that gives each character
in ios. The stream must be opened for reading or an IOError will be raised.
f = File.new("testfile")
f.chars.to_a
f.rewind
f.chars.sort
Show source
static VALUE
rb_io_chars(VALUE io)
{
return rb_enumeratorize(io, ID2SYM(rb_intern("each_char")), 0, 0);
}