Skip to content
instance method

ARGF#lineno

ARGF.lineno → integer

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
See also #lineno= #internal_encoding #inspect #path also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0