instance method
IO#lineno
() -> ::Integer
lineno → integer
io.c
View on GitHub ↗
static VALUE
rb_io_lineno(VALUE io)
{
rb_io_t *fptr;
GetOpenFile(io, fptr);
rb_io_check_char_readable(fptr);
return INT2NUM(fptr->lineno);
}
Returns the current line number for the stream; see Line Number.