Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix klass name if klass is singleton_class #1695

Merged
merged 1 commit into from
Dec 21, 2023
Merged

Conversation

ksss
Copy link
Collaborator

@ksss ksss commented Dec 20, 2023

When I type-check the singleton method, there is no class/module name in the method name display.

[.foo] ReturnTypeError: expected `Integer` but returns `"a"`

This is due to the fact that the #name of the singleton class returns nil.

To solve the problem, I extracted the original class/module name from the string when #inspect is called.

@soutaro soutaro added this to the RBS 3.4 milestone Dec 21, 2023
Copy link
Member

@soutaro soutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@soutaro soutaro added this pull request to the merge queue Dec 21, 2023
Merged via the queue into ruby:master with commit 5c360d8 Dec 21, 2023
23 checks passed
@soutaro soutaro added the Released PRs already included in the released version label Dec 21, 2023
@ksss ksss deleted the fix-klass-name branch December 21, 2023 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Released PRs already included in the released version
Development

Successfully merging this pull request may close these issues.

2 participants