End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
StringIO#rewind
rewind → 0
ext/stringio/stringio.c
View on GitHub ↗
static VALUE
strio_rewind(VALUE self)
{
struct StringIO *ptr = StringIO(self);
ptr->pos = 0;
ptr->lineno = 0;
return INT2FIX(0);
}
Sets the current position and line number to zero; see Position and Line Number.