From: nobu.nokada@... Date: 2002-10-24T21:35:55+09:00 Subject: Re: Read "current line" from a file? Hi, At Thu, 24 Oct 2002 18:57:49 +0900, Gavin Sinclair wrote: > 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? What about this? class IO module Backing def gets(rs = $/) @backing = super end def last @backing end end end STDIN.extend(IO::Backing) p STDIN.gets p STDIN.last -- Nobu Nakada