Skip to content

Add the IO seek constants and mix File::Constants into IO - #460

Merged
tannevaled merged 1 commit into
mainfrom
feat/cluster30
Aug 26, 2026
Merged

tannevaled merged 1 commit into
mainfrom
feat/cluster30

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

IO had no SEEK_SET/SEEK_CUR/SEEK_END (nor SEEK_DATA/SEEK_HOLE)
constants, and did not mix in File::Constants, so IO::SEEK_SET and
IO::RDONLY were uninitialized constants. The seek-whence constants are now
defined on IO — File inherits them since File < IO — and IO includes the
File::Constants module, so the open-mode flags resolve through IO (IO::RDONLY,
IO.include?(File::Constants)) as in MRI.

Verified against ruby 4.0.6. Full package coverage stays at 100.0%.
Zero-regression rubyspec sweep; core/io/constants_spec 0 → 3, and the
newly-defined whence constants also unblock core/io/seek_spec 2 → 8 and
core/io/sysseek_spec 1 → 5.

🤖 Generated with Claude Code

IO had no SEEK_SET/SEEK_CUR/SEEK_END (nor SEEK_DATA/SEEK_HOLE) constants, and did
not mix in File::Constants, so IO::SEEK_SET and IO::RDONLY were uninitialized
constants. The seek-whence constants are now defined on IO — File inherits them
since File < IO — and IO includes the File::Constants module, so the open-mode
flags resolve through IO (IO::RDONLY, IO.include?(File::Constants)) as in MRI.

Verified against ruby 4.0.6. Full package coverage stays at 100.0%. Zero-
regression rubyspec sweep; core/io/constants_spec 0 -> 3, and the newly-defined
whence constants also unblock core/io/seek_spec 2 -> 8 and core/io/sysseek_spec
1 -> 5.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 2379ddc into main Aug 26, 2026
7 checks passed
@tannevaled
tannevaled deleted the feat/cluster30 branch August 26, 2026 08:26
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