Hello
Yo can go back one line and gets
class File
def current
self.lineno=self.lineno-1
self.gets
end
end
hope it helps and it's what you are looking for
bye
On Thu 24 Oct 2002 11:57, Gavin Sinclair wrote:
> All,
>
> Given an IO object, you can get the "next" line with #gets, right?
>
> Given an IO object, you can get the "current" line with #X, right? Please?
>
> I know it's not a common operation, but I would like tobe able to do it.
>
> --
> Gavin Sinclair Software Engineer
> Sydney, Australia Soyabean Software Pty Ltd
--
Javier Fontan Muiņīs
jfontan / cesga.es
CESGA, Supercomputing Center of Galicia