/* * call-seq: * strio.rewind -> 0 * * Positions *strio* to the beginning of input, resetting * +lineno+ to zero. */ static VALUE strio_rewind(self) VALUE self; { struct StringIO *ptr = StringIO(self); ptr->pos = 0; ptr->lineno = 0; ptr->flags &= ~STRIO_EOF; return INT2FIX(0); }