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 typo in rb_class_real doc #3637

Merged
merged 2 commits into from Oct 10, 2020
Merged

Fix typo in rb_class_real doc #3637

merged 2 commits into from Oct 10, 2020

Conversation

S-H-GAMELINKS
Copy link
Contributor

Hi.

I found typo in object.c(but, I'm not sure that was correct)

 * \return the ancestor class found, or a falsey value if nothing found.

falsey is false typo?

@nobu
Copy link
Member

nobu commented Oct 8, 2020

I think it isn't a typo, but simply wrong.
While it seems to intend false or nil, that return value can't be Qnil as it causes a segfault in that case.

@S-H-GAMELINKS
Copy link
Contributor Author

S-H-GAMELINKS commented Oct 9, 2020

So, it's fix like this?

return the ancestor class found, or Qfalse if nothing found.

@marcandre
Copy link
Member

So, it's fix like this?

return the ancestor class found, or Qfalse if nothing found.

Yes. RCLASS_SUPER is rb_class_get_superclass. Note that Qfalse is 0 in C.

@S-H-GAMELINKS
Copy link
Contributor Author

@marcandre
Thanks! I fixed it!

@marcandre marcandre merged commit 5e120a2 into ruby:master Oct 10, 2020
@marcandre
Copy link
Member

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants