Skip to content

Add an in-memory IO::Buffer (creation, typed get/set, bitwise) - #463

Merged
tannevaled merged 2 commits into
mainfrom
feat/cluster33
Aug 26, 2026
Merged

tannevaled merged 2 commits into
mainfrom
feat/cluster33

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Implements the pure-memory core of IO::Buffer, the largest cluster of
unimplemented core specs (149 failing before this change):

  • Construction: new(size=DEFAULT_SIZE, flags), for(string){}, string(size){}.
  • State predicates: null?, empty?, valid?, external?, internal?, mapped?, shared?, private?, locked?, readonly?, size.
  • Byte access: get_string/set_string with offset, length, encoding and #to_str coercion.
  • Typed access: get_value/set_value for all 18 data types (U8..f64, upper-case big-endian / lower-case little-endian, signed/unsigned int and float).
  • Bulk & bitwise: clear, & | ^ ~, bit_count, content ==, and free (including the NULL inspect form).

The memory-mapped, slicing and transfer forms are intentionally deferred to a follow-up.

Behaviour verified against ruby 4.0.6. Whole-package coverage stays at 100%,
and the ruby/spec ratchet floor is bumped 15450 → 15600 to lock in the gain
(language+core now 15660 passing, +57 aggregate, zero regressions in a
deterministic per-file sweep — the only delta is the known random/bytes flake).

🤖 Generated with Claude Code

tannevaled and others added 2 commits August 26, 2026 15:17
Implement the pure-memory core of IO::Buffer: allocation via new/for/string,
the state predicates (null?/empty?/valid?/external?/readonly?/...), byte-level
get_string/set_string with offset/length/encoding and #to_str coercion, typed
get_value/set_value for all 18 data types (U8..f64, big/little endian), clear,
the &/|/^/~ bitwise operators, bit_count, content equality, and free with the
NULL inspect form. The memory-mapped, slicing and transfer forms are deferred
to a follow-up.

Verified against ruby 4.0.6. Whole-package coverage stays at 100%.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The in-memory IO::Buffer lifts language+core to 15660 passing; raise the ratchet
floor to lock in the win while keeping headroom for slower CI runners.

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