E
Erik Hollensbe
Let's say there is a file, 'foo', which contains some text already:
f = File.open("foo", "a")
f.pos => 0 #?!?!?!
f.seek(0, IO::SEEK_END)
f.pos => correct
Now, according to the IO documentation:
"a" | Write-only, starts at end of file if file exists,
| otherwise creates a new file for writing.
This leads me to believe that IO#pos should be set to something other
than 0 if the file contains data already. Is there something wrong with
my assumption, or is this a bug (and if so, is it already known?)
I am using Ruby 1.8.4 on OS X 10.4.6.
Thanks for any help! Please Cc: me personally.
f = File.open("foo", "a")
f.pos => 0 #?!?!?!
f.seek(0, IO::SEEK_END)
f.pos => correct
Now, according to the IO documentation:
"a" | Write-only, starts at end of file if file exists,
| otherwise creates a new file for writing.
This leads me to believe that IO#pos should be set to something other
than 0 if the file contains data already. Is there something wrong with
my assumption, or is this a bug (and if so, is it already known?)
I am using Ruby 1.8.4 on OS X 10.4.6.
Thanks for any help! Please Cc: me personally.