Actions
Backport #2267
closedIO#sync = true causes offset to not be updated after writing on OS X/FreeBSD
Status:
Closed
Assignee:
Description
=begin
#!/usr/bin/env ruby
f = File.open("bar", File::RDWR|File::CREAT, 0600)
f.sync=true
f.read
f.write "Hello"
puts "Should be 5: #{f.pos}"
f.close
rm bar
from http://gist.github.com/216703
The output under FreeBSD (7.2) and OS X with both¶
Ruby 1.8.7 p160 and 1.8.7 p72 is:¶
Should be 5: 0¶
ref: http://thread.gmane.org/gmane.comp.lang.ruby.unicorn.general/100
=end
Actions
Like0
Like0Like0Like0