Skip to content

Conversation

@mame
Copy link
Member

@mame mame commented Dec 3, 2025

Previously, TypeProf would crash when encountering rescue X => e if X was a non-class constant (e.g., X = 1).

This commit fixes the issue by handling cases where the rescued object is not a singleton type, preventing the unhandled exception during type inference.

Fixes #351

Previously, TypeProf would crash when encountering `rescue X => e` if
`X` was a non-class constant (e.g., `X = 1`).

This commit fixes the issue by handling cases where the rescued object
is not a singleton type, preventing the unhandled exception during type
inference.

Fixes ruby#351

Co-Authored-By: Takumi Shotoku <sinsoku.listy@gmail.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@mame mame merged commit b4c2db3 into ruby:master Dec 3, 2025
6 checks passed
@mame mame deleted the rescue-assign-with-non-singleton branch December 3, 2025 08:39
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