Skip to content

Exception: advance MRI 4.0.6 conformance (core/exception residuals) - #555

Merged
tannevaled merged 3 commits into
mainfrom
feat/agent-exception
Sep 4, 2026
Merged

tannevaled merged 3 commits into
mainfrom
feat/agent-exception

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Advances core/exception residuals against MRI 4.0.6 (edit-in-place, no shadowed definitions). Suite + wasm + gofmt verified locally before push; FLOOR untouched — consolidated ratchet bump follows once the wave lands.

🤖 Generated with Claude Code

tannevaled and others added 3 commits September 4, 2026 08:28
Rewrite exceptionDetailedMessage to match MRI 4.0's empty-message and
anonymous-class special cases: an empty message renders the class's
"#<Class:0x…>" repr for an anonymous class, "unhandled exception" for the
exact RuntimeError class, and the bare class name otherwise — never a
"(…)" suffix; a non-empty message on an anonymous class shows just the
message. full_message now DISPATCHES to the exception's own (overridable)
#detailed_message via fullMessageDetailed, coercing a non-String return
through #to_str and falling back to the class name when it is absent or
yields nil.

core/exception/detailed_message_spec: 3→10 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
….new, Exception#message

Format the NoMethodError "for …" tail as MRI 4.0 does: nil/true/false
literally; a class/module by its own (overridable) #name as "class Name" /
"module Name", anonymous as "class #<Class:0x…>" / "module #<Module:0x…>";
an object carrying a singleton class through its identity "#<Class:0x…>"
string (built directly, never dispatching #inspect); and any other object
as "an instance of <ClassName>". NameError.new / NoMethodError.new now
accept MRI's (message, name, [args], receiver:) signature, stamping
#name/#args/#receiver. Exception#message is defined as #to_s, so a
subclass overriding #to_s changes #message.

core/exception: no_method_error 7->21, name_error 1->3, message 3->4;
+24 across the cluster (117->141 pass).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
undefinedMethodReceiver, classDisplayName, anonClassOrModuleRepr,
stampReceiverKwarg and NoMethodError#initialize had receiver-shape and
positional-argument branches the suite never exercised, dropping the merged
-race total below the 100% POSIX gate. Drive them across nil / true / false /
class / module / named + anonymous instance / singleton-carrying receivers, the
NameError receiver: keyword (present, absent, message-only, non-receiver Hash),
and NoMethodError.new(message, name, args). exception.go is now 100%.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit b6cacec into main Sep 4, 2026
7 checks passed
@tannevaled
tannevaled deleted the feat/agent-exception branch September 4, 2026 09:01
tannevaled added a commit that referenced this pull request Sep 4, 2026
Locks in #553 (Kernel), #554 (Module/Class) and #555 (Exception). Measured
18354 passing on the pinned corpus, up from 18245.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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