current_line()
public
@return the current line in the source
Show source
def current_line
begin
pos = @er_source.pos
lineno = @er_source.lineno
@er_source.rewind
line = 0
begin
while @er_source.pos < pos
@er_source.readline
line += 1
end
rescue
end
rescue IOError
pos = -1
line = -1
end
[pos, lineno, line]
end