From: Dave Thomas Date: 2001-01-18T23:52:27+09:00 Subject: [ruby-talk:9515] Re: reading an entire file as a string ts writes: > >>>>> "D" == Dave Thomas writes: > > D> matz@zetabits.com (Yukihiro Matsumoto) writes: > >> I think it won't. there cannot be "initial offset" for each > >> invocation of IO#read. Do you think you need "pre-read skip offset" > >> for IO#read? > > D> Personally, I think it's go for consistency here. If you treated the > D> offset as an absolute seek (SEEK_SET), > > ??? I don't understand > > If you use offset for a SEEK_SET on IO#read, you read always the same data Perhaps you have a random-access fixed-length file: class ErrMsg RECLEN=100 def initialize(name) @f = File.open(name) end def msg(n) f.read(RECLEN, n*RECLEN) end end Dave