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

NoMethodError location for "":String in on_regexp_add #316

Closed
vinistock opened this issue Feb 24, 2023 · 2 comments
Closed

NoMethodError location for "":String in on_regexp_add #316

vinistock opened this issue Feb 24, 2023 · 2 comments

Comments

@vinistock
Copy link
Contributor

I don't know what Ruby code triggers this error, but we caught it in the Ruby LSP's telemetry. It appears that part is an empty string and then invoking location on it breaks.

Happens on this line

location: regexp_content.location.to(part.location)

@kddnewton
Copy link
Member

Oh man I would love to know what triggered this. It is almost definitely a syntax error that is passing an unexpected type up the tree somehow. I'll see if I can replicate, but without the source I don't really know.

@kddnewton
Copy link
Member

Okay, I totally believe you, but I cannot figure out a way to reproduce this at all. If you find the original source that did this, I can 100% fix it, but I don't want to add a type check unless I can add a test as well. I'm going to close for now since there's nothing really either of us can do.

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

No branches or pull requests

2 participants