From: ts Date: 2001-01-18T23:29:19+09:00 Subject: [ruby-talk:9514] Re: reading an entire file as a string >>>>> "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 What I'm missing ? D> then it might be useful for reading fixed-record length files. I can do this pigeon% cat aa aaa bbb ccc pigeon% pigeon% ruby f = open("aa") while l = f.read(4) p l end ^D "aaa\n" "bbb\n" "ccc\n" pigeon% Guy Decoux