You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NameError/NoMethodError metadata at raise sites; SystemExit exit status (#894)
core/exception (minus Process.kill-to-self files): 28 -> 13 failures.
NameError#name / #receiver now populated where the errors are actually
raised (previously only when constructed manually):
- undefined constant: receiver is the namespace module (Object for a
bare reference), threaded through get_constant_checked /
const_missing / the superclass walk.
- undefined class variable: receiver is the looked-up class.
- bareword 'undefined local variable or method': receiver is self, and
the message uses CRuby 4.0's single-quote form.
- instance_variable_get / class_variable_get with an invalid name:
#name is the *exact* argument object (String/Symbol, so the spec's
equal? holds) and #receiver is self — carried via a pre-materialized
exception object (name_error_reflection).
- NameError#receiver raises ArgumentError 'no receiver is available'
when no receiver was recorded (matching CRuby).
NoMethodError#args is populated from the failed call's arguments at the
method_missing raise site (empty array for a no-arg call), so #args and
Exception#dup round-trip.
SystemExit (and user subclasses) propagate their exit code: raising a
SystemExit-family object syncs MonorubyErrKind::SystemExit's status from
the object's /status ivar (it was baked to 0 by from_class_id), so
'raise SystemExit.new(7)' exits 7 and a 'CustomExit < SystemExit' exits
with its own status.
New differential tests: tests/name_error_api.rs (5) and
tests/system_exit_status.rs (3, spawning the binary to check exit codes).
Claude-Session: https://claude.ai/code/session_01XpzdoFu46d2ChJpSzeWsNK
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments