Repository navigation
conformance: fix the mspec shim's bignum_value (2**63 -> 2**64) - #454
Merged
Merged
Conversation
The vendored MSpec shim defined `bignum_value` as 0x8000_0000_0000_0000 (2**63),
but ruby/spec is written against the real mspec, whose `bignum_value` is 2**64.
Every spec that pins a bignum arithmetic result off `bignum_value` therefore
compared against a value half the size the corpus author intended.
Proof this is a shim bug, not an rbgo one: running core/integer/left_shift_spec
through *MRI* under this shim passes 29/34, but with `bignum_value` set to 2**64
MRI passes 34/34 — the corpus's hard-coded expectations require 2**64.
Correcting the shim raises rbgo's measured language + core total from 15461 to
15521 (+60) with zero per-file regressions — the wins are spread across
integer/{left_shift,right_shift,bit_and,bit_or,bit_xor,plus,minus,multiply,
chr,to_s,divide,…}, float, rational and array/pack specs whose bignum
expectations were simply being compared against the wrong magnitude. The ratchet
floor is bumped 15400 -> 15450 to lock the gain in (margin left for the
random/bytes and require flakes).
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.
The vendored MSpec shim defined
bignum_valueas0x8000_0000_0000_0000(2**63), but ruby/spec is written against the real mspec, whose
bignum_valueis 2**64. Every spec that pins a bignum arithmetic result off
bignum_valuetherefore compared against a value half the size the corpus authorintended.
Proof this is a shim bug, not an rbgo one: running
core/integer/left_shift_specthrough MRI under this shim passes 29/34, butwith
bignum_valueset to2**64MRI passes 34/34 — the corpus's hard-codedexpectations require
2**64.Correcting the shim raises rbgo's measured language + core total from 15461 to
15521 (+60) with zero per-file regressions — the wins spread across
integer/{left_shift,right_shift,bit_and,bit_or,bit_xor,plus,minus,multiply,chr, to_s,divide,…},float,rationalandarray/packspecs whose bignumexpectations were being compared against the wrong magnitude. The ratchet floor
is bumped 15400 → 15450 to lock the gain in (margin left for the
random/bytesandrequireflakes).🤖 Generated with Claude Code