End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
StringIO#each_char
strio.each_char {|char| block } → strio
strio.each_char → anEnumerator
ext/stringio/stringio.c
View on GitHub ↗
static VALUE
strio_each_char(VALUE self)
{
VALUE c;
RETURN_ENUMERATOR(self, 0, 0);
while (!NIL_P(c = strio_getc(self))) {
rb_yield(c);
}
return self;
}
See IO#each_char.