Repository navigation
kernel: Integer/Float coercion + default inspect conformance (core/kernel +16) - #589
Merged
Merged
Conversation
…tion) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… test The wave-18 kernel work made at_exit without a block raise ArgumentError "called without a block" — MRI 4.0.5 behaviour (ruby -e 'at_exit' confirms), not the LocalJumpError the pinned TestPBKernelIntrospectionEdges expected. Update the assertion to the MRI-verified value. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…verflow) The new Object#<=> dispatches #==; a class that includes Comparable (whose #== is (self <=> other) == 0) without defining its own #<=> — e.g. a Numeric subclass — looped <=> -> == -> <=> to a fatal stack overflow (caught on every CI lane; TestObjectSpaceshipIdentity's 'class S < Numeric' case). Add a per-VM objcmpPath pair guard so the re-entry treats the objects as incomparable (nil), matching MRI's rb_exec_recursive_paired guard in cmp_equal. Verified vs MRI 4.0.5: (S.new <=> S.new) => nil, (S.new == S.new) => false, (a <=> a) => 0. -race clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
defaultObjectInspect renders a plain object as #<Class:0x...> as MRI does (ruby -e 'class E;end; p E.new' => "#<E:0x...>"); the stale TestValueReprAndTruthy pinned the old address-less "#<E>". This failure was masked by the pre-fix stack overflow. Assert the inspect shape (prefix/suffix) since the address is not fixed; puts/ToS still renders "#<E>" (unchanged) and library classes with their own #inspect are unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
defaultObjectInspect was 61.1% — the tests only inspected objects with no instance variables, leaving its first-ivar and subsequent-ivar branches uncovered, dropping the merged total below the 100% gate (macOS lane). Inspect an object with two ivars (#<E:0x... @A=1, @b="x">, verified vs MRI 4.0.5) to cover both branches. bootstrap (99.7%) and cloneSingleton (79.2%) remain — identical to main, structurally below 100%. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tannevaled
added a commit
that referenced
this pull request
Sep 7, 2026
…590) Wave-18 merged three bibliography-first conformance PRs: - #587 core/regexp: consume the n/u/e/s encoding modifiers now recorded by go-ruby-parser v0.1.8 (cross-repo #23) — core/regexp +12, language/regexp +6. - #588 core/io: read/write/positioning/iteration surface (gets/each/seek symbol whence/closed-stream guards/putc/sync/binread) — core/io +48. - #589 core/kernel: Integer/Float coercion messages, default Object#inspect with the object address + ivars, Object#<=> via #== with a Comparable#== recursion guard (fixing a stack overflow), at_exit no-block ArgumentError — core/kernel +16. Measured total on merged main: 19651 passing. Local measure at TIMEOUT=25; CI runs TIMEOUT=60 so its total is >= this floor. 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.
Wave-18 core/kernel: conversion and introspection edges on top of the caller/raise work from a prior wave.
core/kernel: 1796 → 1812 (+16), verified byte-for-byte vs MRI 4.0.5. Files: builtins.go, kernel_introspect.go.
Fixes (each read against ruby/ruby v3_4_0 object.c/eval.c/numeric.c): Float()/Integer() argument-error messages carrying the actual arity/value, the default Kernel#inspect (
defaultObjectInspect:#<Class:0x… @ivar=…>with instance variables) as a real override, and related coercion edges. A pre-existing test that pinnedat_exit-without-a-block to LocalJumpError was updated to the MRI-verified ArgumentError "called without a block" (ruby -e 'at_exit'confirms) — part of the fix.Gates:
go build ./...,go test ./...(internal/vm passes in isolation; only pre-existing 127.0.0.1:1 network tests fail locally), 100% coverage on the changed functions, gofmt clean, wasip1 build. Rebased onto current main. FLOOR untouched (bumped in the consolidated wave-18 floor PR).🤖 Generated with Claude Code