method

line

line(line_no)
public

Returns the current line number for #io.

#line counts the number of times #gets is called.

See IO#lineno for more information.