instance method
ARGF#lineno
ARGF.lineno → integer
io.c
View on GitHub ↗
static VALUE
argf_lineno(VALUE argf)
{
return INT2FIX(ARGF.lineno);
}
Returns the current line number of ARGF as a whole. This value can be set manually with ARGF.lineno=.
For example:
Example
ARGF.lineno #=> 0 ARGF.readline #=> "This is line 1\n" ARGF.lineno #=> 1