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 ConstNode#absolute? raising NoMethodError when the constant is not namespaced #115

Merged
merged 1 commit into from Sep 16, 2020

Conversation

dvandersluis
Copy link
Member

@dvandersluis dvandersluis commented Sep 16, 2020

Came up in rubocop/rubocop#8738.

When there is no namespace, each_path.first is nil, which caused

NoMethodError: undefined method `cbase_type?' for nil:NilClass

@dvandersluis dvandersluis changed the title Fix ConstNode#ancestor? raising NoMethodError when the constant is not namespaced Fix ConstNode#absolute? raising NoMethodError when the constant is not namespaced Sep 16, 2020
@marcandre marcandre merged commit d09aa14 into rubocop:master Sep 16, 2020
@marcandre
Copy link
Contributor

Oops, good catch, thanks!

@marcandre
Copy link
Contributor

Released in v0.4.1

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.

None yet

2 participants