From: matz@... (Yukihiro Matsumoto) Date: 2001-11-22T01:13:51+09:00 Subject: [ruby-talk:26038] Re: File access modes Hi, In message "[ruby-talk:25890] File access modes" on 01/11/20, "HarryO" writes: |.... but I orginally wrote the File.open() as ... | | File.open("counter", "w+") | |and the f.gets seemed to return an empty string every time, |irrespective of whether the file already existed, and even if |I put an extra f.rewind before it (although, I thought that was |redundant). man fopen .... w+ Open for reading and writing. The file is created if it does not exist, otherwise it is truncated. The stream ^^^^^^^^^^^^^^^ is positioned at the beginning of the file. .... matz.