In article <20050515024916.GA7991 / ws0.localdomain>, Stephen Lewis <slewis / orcon.net.nz> writes: > Ruby doesn't seem to have an equivalent to clearerr(3), which might > help here - but a successful seek is supposed to reset the eof flag, > though it's fairly ugly, and isn't guaranteed to succeed (it'll > probably break with pipes for one thing). You might try an > ungetc/getc pair as another workaround, but there's probably a much > nicer way. Since 1.8.3, Ruby calls clearerr(3) before getc(3) in IO#gets. So you don't need to clear the eof flag in this case. -- Tanaka Akira