Repository navigation
Add an in-memory IO::Buffer (creation, typed get/set, bitwise) - #463
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the pure-memory core of
IO::Buffer, the largest cluster ofunimplemented core specs (149 failing before this change):
new(size=DEFAULT_SIZE, flags),for(string){},string(size){}.null?,empty?,valid?,external?,internal?,mapped?,shared?,private?,locked?,readonly?,size.get_string/set_stringwith offset, length, encoding and#to_strcoercion.get_value/set_valuefor all 18 data types (U8..f64, upper-case big-endian / lower-case little-endian, signed/unsigned int and float).clear,&|^~,bit_count, content==, andfree(including theNULLinspect 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/bytesflake).🤖 Generated with Claude Code