Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
StringIO#lineno=
(::Integer arg0) -> ::Integer
lineno = new_line_number → new_line_number
ext/stringio/stringio.c
View on GitHub ↗
static VALUE
strio_set_lineno(VALUE self, VALUE lineno)
{
StringIO(self)->lineno = NUM2LEN(lineno);
return lineno;
}
Sets the current line number in self to the given new_line_number; see Line Number.