Skip to content

conformance: IO rows for #pwrite on disk, #ungetc, flush ranges, and the opened file - #55

Merged
tannevaled merged 2 commits into
mainfrom
io-974-rows
Nov 22, 2026
Merged

tannevaled merged 2 commits into
mainfrom
io-974-rows

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

What

The IO rows of content/en/conformance.md, brought in line with what the interpreter now does after go-embedded-ruby/ruby#977 and go-embedded-ruby/ruby#978:

  • #pwrite. The old row said a #pwrite's bytes stayed in memory. They reach the file when it returns, and only those bytes; the row now says so.
  • #ungetc / #ungetbyte. A new row: pushed-back bytes never reach the file, #pos counts them, and MRI's 8192-byte read buffer is the remaining divergence.
  • Flush ranges. A new row: a flush writes only the byte ranges this stream wrote, so another writer's bytes elsewhere in the file stand. A refused flush raises its own errno.
  • The opened file. A new row: a stream whose path is unlinked, renamed over, or swapped for a symlink never writes into what the path names now. On Unix the stream holds a descriptor so that a reused inode number cannot pass for the opened file, and #truncate still truncates a file made read-only after the open.

Each row matches the README row of the same name in go-embedded-ruby/ruby at 91a523dc.

The landing page names none of these, so it needs no change.

Refs go-embedded-ruby/ruby#974
Refs go-embedded-ruby/ruby#977
Refs go-embedded-ruby/ruby#978

🤖 Generated with Claude Code

tannevaled and others added 2 commits November 22, 2026 17:41
…ed-file identity

The #pwrite row said its bytes are not on disk until a flush; since
go-embedded-ruby/ruby#975 they are, as with pwrite(2). It is rewritten
to the ruby README's current row, with the two deliberate bounds.

Three rows are added, each mirroring the ruby README:
- #ungetc keeps pushed-back bytes out of the file (go-embedded-ruby/ruby#977);
  the divergence left is MRI's 8192-byte read buffer.
- a flush writes only the ranges this stream wrote (go-embedded-ruby/ruby#978);
  the divergence left is the 256-range bound.
- a stream writes only into the file it opened, never into what its path
  names after an unlink, rename or symlink swap (go-embedded-ruby/ruby#978);
  the divergences left are the orphaned inode and the fifo window.

Refs go-embedded-ruby/ruby#974

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… keeps the open's grant

Follows go-embedded-ruby/ruby#978: on Unix a file stream holds a descriptor on the file it opened, so a reused inode number cannot pass for it, and #truncate on a file chmodded read-only after the open succeeds as in MRI 4.0.7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 7b3803d into main Nov 22, 2026
2 checks passed
@tannevaled
tannevaled deleted the io-974-rows branch November 22, 2026 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant