Project

General

Profile

Actions

Backport #2267

closed

IO#sync = true causes offset to not be updated after writing on OS X/FreeBSD

Added by normalperson (Eric Wong) over 14 years ago. Updated almost 13 years ago.


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 #1

Updated by nobu (Nobuyoshi Nakada) over 14 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r25485.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions #2

Updated by shyouhei (Shyouhei Urabe) over 14 years ago

  • Status changed from Closed to Assigned
  • Assignee set to wyhaines (Kirk Haines)

=begin
I don't have neither environment to reproduce so please reject it if not, but it seems to me that this issue affects 1.8.6.
=end

Actions #3

Updated by wyhaines (Kirk Haines) almost 14 years ago

  • Status changed from Assigned to Closed

=begin
This issue was solved with changeset r28393.
Eric, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0