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

Add rb_file_able_p function #4677

Merged
merged 4 commits into from
Jul 29, 2021
Merged

Conversation

S-H-GAMELINKS
Copy link
Contributor

Some function has similar code in file.c.
Add rb_file_able_p function and refactor these function.

@nobu
Copy link
Member

nobu commented Jul 25, 2021

How about return RBOOL(rb_eaccess(fname, R_OK) >= 0); using the macro defined now in range.c?

Moreover, \? *Qtrue *: *Qfalse and the reverse can be found over 200 places.

@S-H-GAMELINKS
Copy link
Contributor Author

@nobu
Thanks you for comment.
That's good! I'll replace and using RBOOL macro.

@S-H-GAMELINKS
Copy link
Contributor Author

@nobu

Moreover, ? *Qtrue *: *Qfalse and the reverse can be found over 200 places.

I'll try this another pull request.

@nobu nobu merged commit 64adeea into ruby:master Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants