On Sat, Apr 21, 2001 at 02:03:07AM +0900, Jim Freeze wrote:
> Hi:
> 
> Is it possible to 'un'readline?
> 
> I have a file that has possible line continuations.
> I can only know if a line is continued by reading the
> next line and checking for /^\+/. If it is there, then
> the line is continued.

It would be easier to just read the whole file into core with
'readlines', and than parse the resulting array.  If you don't
have the memory for that, you'll need to use 'seek' to 
re-position the file pointer:

	f = File.open('your_file')
	buf = f.readline
	...
	f.seek(-buf.length, IO::SEEK_CUR)
	...

David S.