Repository navigation
Exception: advance MRI 4.0.6 conformance (core/exception residuals) - #555
Merged
Merged
Conversation
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>
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.
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